Re: Only root can write on USB disk
On Thu 04 May 2017 at 19:52:46 +0430, Mostafa Shahverdy wrote:
> > In my /etc/fstab, I add lines for the drives and put 'user' in the options:
> > LABEL=<filesystem-label> <mount point> auto noauto,user,rw,exec 0 0
> I played with fstab as far as I could, and still no luck. It is still
> owned by root. I also found that there are some errors in my dmesg:
> [10021.791499] usb-storage 3-1:1.0: USB Mass Storage device detected
> [10021.793693] scsi host9: usb-storage 3-1:1.0
> [10022.814216] scsi 9:0:0:0: Direct-Access Philips USB Flash Drive PMAP PQ: 0 ANSI: 4
> [10022.814812] sd 9:0:0:0: Attached scsi generic sg8 type 0
> [10030.989808] sd 9:0:0:0: [sdi] 15267823 512-byte logical blocks: (7.82 GB/7.28 GiB)
> [10030.992298] sd 9:0:0:0: [sdi] Write Protect is off
> [10030.992301] sd 9:0:0:0: [sdi] Mode Sense: 23 00 00 00
> [10030.994174] sd 9:0:0:0: [sdi] No Caching mode page found
> [10030.994180] sd 9:0:0:0: [sdi] Assuming drive cache: write through
> [10031.020946] sdi:
> [10031.029429] sd 9:0:0:0: [sdi] Attached SCSI removable disk
> [10031.299766] FAT-fs (sdi): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
> I also ran fsck on my drive, and it showed me that the dirty bit was on,
> and then it made it off.
Nothing of any great consequence here.
> this is my fstab line:
> /dev/sdh1 /media/mostafa/flash_h1 auto user,rw,nosuid,nodev,relatime 0 0
What is the output of
ls -l /media/mostafa/flash_h1 ?