LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2006, 01:52 PM   #1
goggyturk
LQ Newbie
 
Registered: Oct 2003
Posts: 22

Rep: Reputation: 15
file permissions on mounted disk


Hello all

I have a problem with file permissions on a FAT32 partition I mounted to a directory in root (say /shared - created by mkdir /shared as root).

It seems by default permissions are set to 755, a pain cos I want to write to the partition as a regular user. However, when I run this:

find /shared -name '*' -exec chmod 777 {} \;

it appears everything has changed to 777 (I checked by running chmod -v), but then when I try to write as joe user it won't let me.

What should I do to resolve this issue?
 
Old 10-24-2006, 02:23 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Fat partitions can't natively handle *nix permissions settings. They have to be simulated during mounting with the umask mount option. Something like:

mount -t vfat -o rw,umask=000 /dev/hdb /shared

The umask numbers are the inverse of the permissions you want (022 will give you 755 permissions, for example).

You can also add uid=user and gid=user if you want to specify the drive's default owner and group.
 
Old 10-25-2006, 01:44 PM   #3
goggyturk
LQ Newbie
 
Registered: Oct 2003
Posts: 22

Original Poster
Rep: Reputation: 15
That worked a treat. I adjusted my /etc/fstab with the options you suggested and now it's all as it should be.

Thanks a lot!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with file permissions on mounted fat drives kizersouzay Linux - Newbie 1 07-08-2006 10:34 AM
changing permissions of mounted fs mrchaos Slackware 3 03-16-2005 02:43 PM
mounted but no write permissions varunk123456 Linux From Scratch 1 03-31-2004 02:55 PM
Permissions on mounted disk simanyay Linux - Software 2 03-30-2004 10:23 AM
mounted vfat permissions n3tw0rk Linux - General 3 12-05-2003 04:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration