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 09-03-2007, 01:18 PM   #1
deretsigernu
LQ Newbie
 
Registered: May 2007
Distribution: Slackware 14.1
Posts: 23

Rep: Reputation: 0
changing permissions on a VFAT drive


i have a partition that lists on Ubuntu as a VFAT drive, sda3. in the properties it says root is the owner and that it is part of plugdev group. i'm trying to save image files to it and it won't let me. i get an error message that says i cannot change the content of the folder. when i ls -l the drive it says:
dr-xr-x--- 9 root plugdev 16384 2007-05-21 22:35 My Pictures

i tried "chmod o=rwx /media/sda3/jwindoc/'My Pictures' " as root and none of the other permission changed. how can i get access to this folder to save stuff? i can open and view images in it, but i can't put any into it.
 
Old 09-03-2007, 01:49 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
This example assumes that your user account is a member of the users user group. You can check this by entering the following command in a terminal window.
Code:
groups
The objective of this procedure is to get the mounted VFAT partition to be owned by the root user account and the users user group. Then we will set the permissions to allow the members of the users group to write files into that mounted partition.
Code:
chown -Rc root:users /media
chmod -Rc u=rwx,g=rwx /media
That should do it.

If that doesn't work then add or edit the line in /etc/fstab for that partition so that it looks like the following.
Code:
/dev/sda3  /media/sda3  auto  defaults,gid=(100)  0  0

Last edited by stress_junkie; 09-03-2007 at 01:53 PM.
 
Old 09-03-2007, 02:48 PM   #3
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Or simply add dmask=0000,fmask=0111 to mount options of your sda3 drive.
 
Old 09-03-2007, 10:44 PM   #4
deretsigernu
LQ Newbie
 
Registered: May 2007
Distribution: Slackware 14.1
Posts: 23

Original Poster
Rep: Reputation: 0
i haven't tried either of your suggestion yet, but i will later. thanks for the replies.
 
Old 09-05-2007, 08:54 PM   #5
deretsigernu
LQ Newbie
 
Registered: May 2007
Distribution: Slackware 14.1
Posts: 23

Original Poster
Rep: Reputation: 0
it kind of worked.

i used /media. that also changed ALL the directories on sda6, the SUSE partition on my machine. (it also changed sda1, my MS partition, but i'm guessing that i won't have to worry about. please tell me i'm right.) so, am i gonna have to uninstall SUSE and reinstall to get the permissions corrected?
 
Old 09-05-2007, 09:04 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
What exactly did you change. Post your /etc/fstab entries for this partitions.
Also post the output of the "mount" command without options.

Quote:
gid=(100)
I've never seen an fstab entry where the gid or uid entry is in parenthesis. You can use your username instead. SuSE starts uids at 1000. Other distro's start them at 500. I prefer using a username instead of a UID number.

Just so that you know, since the vfat filesystem doesn't save permissions for each file, the uid= and gid= values and the umask value (or separate dmask and fmask values) that you have in your fstab entry will change these values globally for the entire filesystem. ( I.E. the contents of /dev/sda3 in your example )
 
Old 09-06-2007, 10:01 PM   #7
deretsigernu
LQ Newbie
 
Registered: May 2007
Distribution: Slackware 14.1
Posts: 23

Original Poster
Rep: Reputation: 0
jschiwal, thanks. i don't know what all that -mask stuff is, but i'll look into it. anyway, here is fstab:

Quote:
# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda7 :
UUID=61946b35-1c2f-45b6-b7d0-231a626b63f3 / ext3 defaults,errors=remount-ro 0 1
# Entry for /dev/sda1 :
UUID=48DCEFCBDCEFB17C /media/sda1 ntfs-3g defaults,locale=en_US.UTF-8 0 1
# Entry for /dev/sda2 :
UUID=3751-5B7F /media/sda2 vfat defaults,utf8,umask=007,gid=46 0 1
# Entry for /dev/sda3 :
UUID=4642-1A54 /media/sda3 vfat defaults,utf8,dmask=0000,fmask=0111,gid=46 0 1
# Entry for /dev/sda6 :
UUID=336dd177-8dfb-46a2-8b72-d38d606634bb /media/sda6 ext3 defaults 0 2
# Entry for /dev/sda5 :
UUID=6e6658f3-b910-4d39-b8ba-39ab655fa514 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
and mount

Quote:
/dev/sda7 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-16-generic/volatile type tmpfs (rw)
/dev/disk/by-uuid/48DCEFCBDCEFB17C on /media/sda1 type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/sda2 on /media/sda2 type vfat (rw,utf8,umask=007,gid=46)
/dev/sda3 on /media/sda3 type vfat (rw,utf8,dmask=0000,fmask=0111,gid=46)
/dev/sda6 on /media/sda6 type ext3 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
 
Old 09-09-2007, 03:00 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
If you are the only user of the partition, you could use the "uid=" option and make yourself the owner of the mounted filesystem. For example "uid=deretsigernu,user". The user option will allow you to mount the filesystem as a normal user.

One possibility is that the hotplug setup is conflicting with the fixed fstab setup. Media commonly used for removable drives rather than partitions on your main drive. The dmask and fmask values you used for /dev/sda3 look OK, but:
Code:
UUID=3751-5B7F /media/sda2 vfat defaults,utf8,umask=007,gid=46 0 1
A umask of 007 for /dev/sda2, if the user is root and group is plugdev, will not allow you (an other user) access. This isn't reflected in the mount output however.
 
Old 09-10-2007, 10:39 AM   #9
deretsigernu
LQ Newbie
 
Registered: May 2007
Distribution: Slackware 14.1
Posts: 23

Original Poster
Rep: Reputation: 0
ok, thanks for the information. i'll try to update my settings later and hopefully post something good after that.
 
  


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
Permissions error on vfat USB drive brooky9999 Slackware 3 08-13-2006 07:53 AM
Changing Fstab in ubuntu to mount vfat drive mikeymorgan Linux - Newbie 13 06-23-2005 08:50 AM
Changing permissions on VFAT files bluesailor Linux - Software 7 10-08-2003 07:57 PM
Mounted drive permissions? Vfat kiteless Linux - General 3 08-29-2003 01:32 PM
Changing Permissions of windows drive sub_bastard Linux - Newbie 2 08-03-2003 10:15 PM


All times are GMT -5. The time now is 08:59 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