Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't change permissions on USB stick [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
justin_brody
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 283

PostPosted: Wed Jan 23, 2008 1:23 pm    Post subject: Can't change permissions on USB stick [SOLVED] Reply with quote

Hi,
I'm sure I'm missing something obvious here. I want to be able to write to my USB drive as a user.
I mount it (as root) with:
Code:

samsara ~ # mount -t vfat /dev/sdc1 /mnt/usb/
samsara ~ # cd /mnt/usb/
samsara usb # chmod 777 .
samsara usb # ls -al
total 2432
drwxr-xr-x 3 root root   16384 Dec 31  1969 .
drwxr-xr-x 9 root root     240 Jan 13 17:43 ..
-rwxr-xr-x 1 root root  777740 Mar 29  2007 ImationLOCKv108-BManual.pdf
-rwxr-xr-x 1 root root 1609728 Mar 16  2007 LOCKv116.exe
drwxr-xr-x 4 root root   32768 Jan 22 07:50 portfolio-retreat


So it didn't actually change to 777. Anyone know why and what I can do to let my regular user write to this file?

Thanks!


Last edited by justin_brody on Tue Feb 19, 2008 11:20 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Wed Jan 23, 2008 2:56 pm    Post subject: Reply with quote

The vfat filesystem does not support Unix permissions. You'll either
1) use another filesystem :-)
2) Mount with global permissions to the drive. specify umask=000 in fstab, and everyone can use that disk.
3) Mount as a user. Specify "user" in fstab or I don't know the new-fangled udev method to handle this. Then the user that mounts the drive has full access to the disk.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Wed Jan 23, 2008 2:59 pm    Post subject: Re: Can't change permissions on USB stick Reply with quote

justin_brody wrote:
Hi,
I'm sure I'm missing something obvious here. I want to be able to write to my USB drive as a user.
I mount it (as root) with:
Code:

samsara ~ # mount -t vfat /dev/sdc1 /mnt/usb/
samsara ~ # cd /mnt/usb/
samsara usb # chmod 777 .
samsara usb # ls -al
total 2432
drwxr-xr-x 3 root root   16384 Dec 31  1969 .
drwxr-xr-x 9 root root     240 Jan 13 17:43 ..
-rwxr-xr-x 1 root root  777740 Mar 29  2007 ImationLOCKv108-BManual.pdf
-rwxr-xr-x 1 root root 1609728 Mar 16  2007 LOCKv116.exe
drwxr-xr-x 4 root root   32768 Jan 22 07:50 portfolio-retreat


So it didn't actually change to 777. Anyone know why and what I can do to let my regular user write to this file?

Thanks!


FAT doesn't support permissions. Try this guide... http://gentoo-wiki.com/HOWTO_Mount_Windows_partitions_%28DOS%2C_FAT%2C_NTFS%29
Back to top
View user's profile Send private message
StarDragon
Guru
Guru


Joined: 19 Jun 2005
Posts: 390
Location: tEXas

PostPosted: Wed Jan 23, 2008 6:03 pm    Post subject: Re: Can't change permissions on USB stick Reply with quote

justin_brody wrote:
I mount it (as root)


Try to mount it from a regular user by adding it to /etc/fstab. It worked for me.
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Wed Jan 23, 2008 7:28 pm    Post subject: Re: Can't change permissions on USB stick Reply with quote

StarDragon wrote:
Try to mount it from a regular user by adding it to /etc/fstab. It worked for me.


Or use the appropriate uid= and gid= options in /etc/fstab or as a parameter when mounting. See http://gentoo-wiki.com/HOWTO_Mount_Windows_partitions_%28DOS%2C_FAT%2C_NTFS%29 for a good overview.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
kortec
n00b
n00b


Joined: 20 Dec 2004
Posts: 68

PostPosted: Wed Jan 23, 2008 9:02 pm    Post subject: Reply with quote

My fstab line for my fat32 partition looks like this, just for reference:
Code:

/dev/hda2               /mnt/media              vfat            user,noatime,rw,gid=media,umask=007     0 0


which mounts hda2 to /mnt/media, such that it can be done by a user, but only gives meaningful permissions to people in the media group. Might help.
Back to top
View user's profile Send private message
justin_brody
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 283

PostPosted: Tue Feb 19, 2008 11:20 am    Post subject: Reply with quote

Great - this worked. Thanks for all the responses!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum