You are not logged in.
Hello,
I'm having trouble with getting write permissions on a fat32 formatted drive. I used this command to format it: sudo mkfs.vfat /dev/sdb1 -F32 -n Sandisk. I also tried replacing /dev/sdb1 for /dev/sdb but ended up with the same result. When I try to access the drive it sets the owner to root and I cannot do anything as a regular user.
Thanks in advance.
Last edited by marcelo1401 (2017-01-25 17:13:59)
Offline
How do you mount the drive?
Offline
How do you mount the drive?
I use
sudo mount /dev/sdb1 USB
; I also tried
mount /dev/sdb1 USB
Offline
Quoth 'man mount'
Mount options for ntfs
iocharset=name
Character set to use when returning file names. Unlike VFAT,
NTFS suppresses names that contain nonconvertible characters.
Deprecated.
nls=name
New name for the option earlier called iocharset.
utf8 Use UTF-8 for converting file names.
uni_xlate={0|1|2}
For 0 (or `no' or `false'), do not use escape sequences for
unknown Unicode characters. For 1 (or `yes' or `true') or 2,
use vfat-style 4-byte escape sequences starting with ":". Here
2 give a little-endian encoding and 1 a byteswapped bigendian
encoding.
posix=[0|1]
If enabled (posix=1), the filesystem distinguishes between upper
and lower case. The 8.3 alias names are presented as hard links
instead of being suppressed. This option is obsolete.
uid=value, gid=value and umask=value
Set the file permission on the filesystem. The umask value is
given in octal. By default, the files are owned by root and not
readable by somebody else.
Mayhaps an appropriate set of uid, gid, and umask will solve your problem?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
The option names are the same for ntfs and fat and the values by default are the same as the mount command is being run by root.
Offline
Sorry I haven't answered sooner.
Mayhaps an appropriate set of uid, gid, and umask will solve your problem?
How would I set those value, what would be the comand? I tried
sudo mount /dev/sdb1 USB -o umask=750
and can't get it working consistently, sometimes it does sometimes it doesn't.
Offline
I usually set dmask and fmask, but I think setting just umask should do it. The mask is in octal, so I think you need a leading 0 (zero). IOW, umask=0750
I could be wrong, and (unfortunately) I cannot fiddle with my Linux box right now.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thanks ewaller. That's it! Btw, if you want to mount the drive with your user as the owner you'll have to set uid and gid too. This is the comand I used
sudo mount /dev/sdb1 USB/ -o uid=1000,gid=1000,umask=0750
You may have to tweak it to your own system.
Last edited by marcelo1401 (2017-01-25 17:23:33)
Offline