T Sent via BlackBerry by AT&T -----Original Message----- From: Dos-Man 64 <[email protected]> Sender: [email protected] Date: Tue, 8 Feb 2011 18:23:54 To: Linux Users Group<[email protected]> Reply-To: [email protected] Subject: [lug:17096] Re: flash drives and mp3 players being mounted as read-only devices.
It seems like it worked. >From what I can tell, all the files in /media/MYDATA are now writable to anyone. Furthermore the gui options for changing the permissions are disabled. That seems like the way it should be since you can change them from there anyway. Thanks :) On Feb 8, 7:59 pm, Daniel Eggleston <[email protected]> wrote: > vfat is the name of the linux FAT driver. FAT doesn't support real file > permissions, so all permissions are managed at mount time (you set a umask > on the mount device). > > Automount mounts as the user, so you should own all the files if it > automounts. If it's not automounted (i.e. you're using /etc/fstab), use the > 'user' mount option so your users can mount & own the files on the drive. > > The warning you posted is about connecting to the session manager (D-Bus) > and is because the command can't access the dbus session. Nothing to worry > about, this is normal for dbus enabled applications launched from the > terminal or as another user. > > Here's an example of a FAT drive, mounted without any options: > > [ [email protected] : /home/eggled/fatmnt ] > $ ls -l > total 6 > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 a > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 b > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 c > [ [email protected] : /home/eggled/fatmnt ] > $ sudo chmod 777 * > [ [email protected] : /home/eggled/fatmnt ] > $ ls -l > total 6 > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 a > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 b > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 c > [ [email protected] : /home/eggled/fatmnt ] > $ sudo chown eggled * > chown: changing ownership of `a': Operation not permitted > chown: changing ownership of `b': Operation not permitted > chown: changing ownership of `c': Operation not permitted > [ [email protected] : /home/eggled/fatmnt ] > $ ls -l * > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 a > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 b > -rwxr-xr-x. 1 root root 2 Feb 8 18:50 c > > The same drive, mounted with the options "uid=eggled,gid=eggled": > [ [email protected] : /home/eggled ] > $ ls -l fatmnt/ > total 6 > -rwxr-xr-x. 1 eggled eggled 2 Feb 8 18:50 a > -rwxr-xr-x. 1 eggled eggled 2 Feb 8 18:50 b > -rwxr-xr-x. 1 eggled eggled 2 Feb 8 18:50 c > > Same drive, this time with "uid=eggled,gid=eggled,umask=0000": > [ [email protected] : /home/eggled ] > $ ls -l fatmnt/ > total 6 > -rwxrwxrwx. 1 eggled eggled 2 Feb 8 18:50 a > -rwxrwxrwx. 1 eggled eggled 2 Feb 8 18:50 b > -rwxrwxrwx. 1 eggled eggled 2 Feb 8 18:50 c > > You're right, chmod "works", because you have permission to do so (and the > vfat driver returns success), but FAT filesystems do not support > permissions, so it's not able to save that filesystem data. Chown should > return an error that it's unsupported. > > So, using the info above, you'll need to modify permissions at mount time, > rather than after the fact. If this were a filesystem supporting > permissions (ext, reiser, xfs, jfs, hfs, etc), chown/chmod will work as > expected. > > > > On Tue, Feb 8, 2011 at 5:54 PM, Dos-Man 64 <[email protected]> wrote: > > It is a HP v125w 4GB USB Flash Drive. > > > When I plug it in, two different desktop icons appear. One leads to / > > mnt/sda1. The other leads to /media/MYDATA. > > > The file system is listed as vfat (whatever that is) > > > On Feb 8, 6:14 pm, Shaun Marolf <[email protected]> wrote: > > > What brand of USB drive is this?? Sounds like it has a built in FS > > > controller for data security. > > > > On Tue, 2011-02-08 at 15:00 -0800, Dos-Man 64 wrote: > > > > No, it doesn't work. I used gksu nautilus and entered the password. > > > > Then I went to the file and right-clicked on it. I changed the > > > > permissions for all to read and write, but it immediately reverts back > > > > to read-only for everyone but the owner. > > > > > BTW, > > > > > Nautilus spat out an error message to the console via stdout or > > > > stderr. It says, > > > > > "Nautilus 7291 GNOMEUI-Warning ** Authentication rejected, reason: > > > > None of the authentication protocols specified are supported and host > > > > based authentication failed." > > > > > I'm not quite sure what that all means, but it doesn't sound > > > > promising ;) > > > > > Interestingly, I was able to create a new file on /media/MYDATA, but > > > > now that it is created, I'm not able to change the permissions for the > > > > new file. > > > > > On Feb 8, 5:09 pm, Shaun Marolf <[email protected]> wrote: > > > > > On Tue, 2011-02-08 at 13:53 -0800, Dos-Man 64 wrote: > > > > > > I'm not saying that drives and their files shouldn't be initially > > > > > > mounted as read-only; I just want to know how to override this. > > > > > > > I've got a file here named pic1.png. It's on a 4 GIG removable hp > > > > > > flash drive. When I right-click on it, it says the owner has read > > and > > > > > > write priviledges. It also says that root and others have only > > read- > > > > > > only priviledges. I'm trying to change this, but it isn't letting > > me. > > > > > > > (btw, I'm in dreamlinux right now) > > > > > > In Linux root has full command over the system. Despite permission > > > > > settings root can always change them. So even if root is set to read > > > > > only if you access the file as root you can change its permissions. > > Use > > > > > the command gksu nautilus and give either your root or sudo password > > > > > when prompted, the go to the file to change permissions. > > > > > > --Shaun > > > -- > > You received this message because you are subscribed to the Linux Users > > Group. > > To post a message, send email to [email protected] > > To unsubscribe, send email to [email protected] > > For more options, visit our group at > >http://groups.google.com/group/linuxusersgroup > > -- > > Daniel -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -- You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup
