LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-20-2003, 07:59 PM   #1
ffang
Member
 
Registered: Aug 2003
Posts: 31

Rep: Reputation: 15
Angry Cannot change mode on vfat partition


I have a vfat partition and can move files around as a root user. I want other users can do the same thing. So I login as root and issued the command:

chmod -R 777 sharedir (at vfat partition)

However, I keep getting the following error message.
chmod: changing permissions of `xxxx' (requested: 0777, actual: 0755): Operation not permitted

I was ROOT at that time. Anyone knows the reason?

Thanks,

ffang
 
Old 10-20-2003, 08:57 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
The reason is simple FAT partition being a propriatery toy from a well known company isn't aware of linux permissions. To set it up you need to edit
/etc/fstab file
put the line there
/dev/hdb1 /mnt/windows vfat noauto,user,owner,umask=0770,rw 0 0
P.S. Assuming your windows fat partition is on /dev/hdb1 and the mount point is /mnt/windows
 
Old 10-22-2003, 04:57 PM   #3
ffang
Member
 
Registered: Aug 2003
Posts: 31

Original Poster
Rep: Reputation: 15
Smile

Thanks, it works.
 
Old 10-22-2003, 05:00 PM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
don't use the umask=0770. that yields a mount permissions of:

--- - --- - rwx

where the owner of the partition (default is root) and group owner of the partition (default again root) have no access.

if you don't want to make groups to have certain users have full access to your partitions and just want to have everyone under the sun be able to troll around your windows partitions, use umask=0000. this yields a mount permissions of:

rwx-rwx-rwx

edit: if it were me, i'd do something like this in fstab:

/dev/hda1 /mnt/c vfat auto,owner,gid=windows,umask=0007,rw,exec 0 0
/dev/hda5 /mnt/d vfat auto,owner,gid=windows,umask=0002,rw,exec 0 0

explaination:
/dev/hda1 = windows C:\
/dev/hda5 = windows D:\

umask=0007 -> mount permissions of rwx - rwx - ---
umask=0002 -> mount permissions of rwx - rwx - r-x

basically for windows, i have it set for other to have no permissions due to the fact that allowing others to have read/exec access can constitute a security hole in that other user's can grab password files from windows, windows apps, and 3rd party apps that use passwords when logged into linux. but i would then create a windows group and put in users that i want to have full permissions on windows partitions, like your user account for convenience. setting a umask to 0002 will still let other users read/exec files/directories on that partition. anyway, for me mounting windows partitions should be thought out on what kind of permissions you wish to set. it also helps to figure out where 3rd party apps that do use passwords where they store those passwords so you can secure that partition accordingly. after all, you spend all that time to secure windows when you boot into windows, it doesn't make sense to leave windows open when booted in linux. of course this depends how you're going to use your computer. if you're the only one going to use this computer then, all this is pretty overkill. if going to allow multiple users like i do, then you might want to take into consideration such things. also take into account what might happen if one of your accounts gets hacked and owned. just my 2 cents.

Last edited by megaspaz; 10-22-2003 at 05:21 PM.
 
Old 10-22-2003, 05:07 PM   #5
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Actually, you can change the permissions of mount point itself (because it's a normal Linux directory), but you can't change them while a Windows filesystem is mounted there. It won't do the trick anyway though, because when the Win filesystem gets mounted the default mask (write permissions for root only) will be applied. That's where the "umask" option comes into play- it overrides the default.

 
Old 10-22-2003, 05:23 PM   #6
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Quote:
Originally posted by DMR
Actually, you can change the permissions of mount point itself (because it's a normal Linux directory), but you can't change them while a Windows filesystem is mounted there. It won't do the trick anyway though, because when the Win filesystem gets mounted the default mask (write permissions for root only) will be applied. That's where the "umask" option comes into play- it overrides the default.

absolutely correct.
 
Old 10-22-2003, 05:39 PM   #7
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Quote:
Originally posted by megaspaz
absolutely correct.
Belive me, I know... I learned it the haaard way!

 
  


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
Change from GUI mode to text mode alexr186 Linux - Software 4 01-08-2009 06:56 AM
Change the display mode in text mode Drunkalot Linux - General 7 08-12-2005 11:35 AM
vfat partition mikedeatworld Linux - Hardware 1 10-01-2004 05:20 PM
How can I change display mode from character mode to graph mode wuzhong Linux - Hardware 1 08-08-2004 09:36 AM
Spurious change of permissions on a VFAT partition under SuSE 8.2 R4cOOn Linux - General 2 10-24-2003 11:26 AM

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

All times are GMT -5. The time now is 10:55 PM.

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