LinuxQuestions.org
Help answer threads with 0 replies.
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 02-25-2004, 07:54 PM   #1
SamJ
LQ Newbie
 
Registered: Feb 2004
Location: Derby, UK
Distribution: Mandrake 10.1 Community on athlon XP2000+
Posts: 24

Rep: Reputation: 15
changing permission of files on vfat hd.


hi people, i have 2 hd's in my machine, one is partitioned for windoze and linux, the other is just a vfat data hd. now the problem is that i can not write to the second hd when logged in as a user, as all permissions are set to root. now when i log in as root, and just right click and hit properties on any of the directories, i can view the permissions, but cant change them, if i change the ownerships, it tells me i dont have enough access to do it, and if i change any of the check box things, as soon as i close the properties box it re-sets to how it was before.

now im completely stumped as to why it wont let me change this, everything in fstab is right as far as i can tell... or at least is the same as for the windoze partition and it will let me write to that.... so any ideas guys?

cheers
SamJ


ps, hope that all makes sence
 
Old 02-25-2004, 08:45 PM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
That's because vfat doesn't have any real permissions. Whatever you mount the drive as (or how it's set up in /etc/fstab) is what you get for permissions. This is a windows problem without much of a work around. Either you mount it so a certain group of users (create a new group that only has write permission on that mount point, then add trusted users to that group--not much of a solution, security wise) can change the files, or you prevent everybody except root from changing those files.

On the upside, this is a real eye opener for people who assumed that their windows systems were secure. Basically, if you can write to any part of a windows partition, you can do anything on a win9X box, despite half-hearted attempts to make it seem secure.

The reason that the permissions don't permanently change as root is because there is nothing to change.
 
Old 02-25-2004, 11:48 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
For vfat mounts, you need to use the uid= and gid= options to set permissions. This is true for some other types of filesystems also. This is because the Fat32 filesystem is not a native unix file system and so doesnīt have uid and gid settings saved. Therefore the options are set in the mount command.

One thing that I learned recently, is that you can enter a user or group name in leu of the uid or gid number. I like this because you donīt have to look up uid and gid numbers.

If you have two users, jsmith and mjones, who you want to allow access to a partition with mp3 files in it, you could create a new group called mp3fileshare. Then make jsmith and mjones members of this new group. Add the option gid=mp3fileshare to the fstab entry for this partition, and change the umask=000 entry to umask=007. This will give full access to the drive to the owner, and the group members, and deny all read, write & execute rights to everyone else (except root of course).
 
Old 02-26-2004, 05:29 AM   #4
SamJ
LQ Newbie
 
Registered: Feb 2004
Location: Derby, UK
Distribution: Mandrake 10.1 Community on athlon XP2000+
Posts: 24

Original Poster
Rep: Reputation: 15
ok, im really confused.... not by what you guys have said, but by the fact that my computer has decided to fix itself just by being turned off.... god knows whats going on but thanks for your help guys.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can't get write permission to vfat Chomper Linux - General 9 01-13-2005 12:38 AM
Changing Files without permission dolphans1 Mandriva 20 09-17-2004 01:16 PM
vfat execute permission Akuji Slackware 3 08-20-2004 01:38 PM
Changing permissions on VFAT files bluesailor Linux - Software 7 10-08-2003 07:57 PM
copy files from vfat to vfat from linux? purpleburple Linux - General 2 12-11-2002 04:24 PM


All times are GMT -5. The time now is 03:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration