Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've just recently installed Fedora Core 1 on my brand new laptop (it's dual-booted with XP Pro SP1 and FC1). I haven't booted into XP since installing Fedora . However, I'm having a problem getting write access to a FAT32 partition that I just mounted. It mounts without a problem:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda5 10080488 2569548 6998872 27% /
none 257052 0 257052 0% /dev/shm
/dev/hda6 27867136 144 27866992 1% /media
Oh, PS: does anybody know what the 'none' is there? Odd.
At any rate, I can access the partition fine, and even write to it as root, but when I try to change the permissions, I get an error message:
chmod: changing permissions of `/media' (requested: 0777, actual: 0755): Operation not permitted
(It repeats that for every file in the directory)
I want to use this as an all-purpose partition to store backups of programs, mp3s, pictures, etc, so that I can freely format the Linux and XP partitions without worry of losing anything valuable. Thus, I was just going to give everybody access to it (chmod -R a+rwx, right?).
Can anybody help me out? I'm a Linux n00b, but slowly learning, so be gentle.
rk
PS ahh, shoot, right after posting I stumbled on a few threads that deal with the same subject. Sorry for spamming. However, if you can offer any succinct advice, please feel free .
Thanks for the quick response. I did indeed read about umask. However, if you're bored, would you mind explaining just what those three digits represent (000 in this case, right?). Are they octals? If so, how do they relate to file permissions?
Thanks!
rk
EDIT: I wrote the following line into my fstab file:
/dev/hda6 /media vfat defaults 0000
However, when I reboot, the permissions for /media are still the same (drwxr-xr-x). What am I doing wrong?
They are octal (it could be 0000). They work opposite of the way they work in chmod:
chmod 777 is the same as umask=000
So if wanted to do the equivalent of 'chmod 755' (rwxrw-rw-), it would be 'umask=022'. The chmod numbers work like this:
r+w+x r+w+x r+w+x
4+2+1 4+2+1 4+2+1
__7__ __7__ __7__
777
rw-rw-rw would be 666 (4+2+0 4+2+0 4+2+0)
Umask is the oppostie: rwxrwxrwx would be 000, rw-rw-rw would be 111.
If you want all users to have read, write and execute on a non-Linux file system (in this case, FAT32),
you will need to use the umask (permissions), uid (owner) and gid (group) options.
In the /etc/fstab file:
Thanks for the explanation of octal aaa. I think I pretty much get it.
Mathieu:
I tried to mount the filesystem using your code (in a terminal, as root), and it gave me the following message:
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
or too many mounted file systems
Any ideas? I typed in the code exactly as you laid it out.
Also, can I have some explanation as to what each piece of the code means? /dev/hda6 is pointing to the device node, /media assigns a directory for the mount point, -t vfat is the filesystem, but what does -o mean? I understand uid and gid, but I don't understand defaults, users, or, in the case of the fstab entry, nls=iso8859-1 0 0.
Heh, I realize that's a good bundle of questions, so if you just wanna concentrate on fixing the problem I understand .
Thanks,
rk
edit: Oh, sorry, I get that -o specifies options, and the proceding are the options themselves. I guess I just need an explanation of what users does, and what dfaults does, as well as the ISO stuff.
users specifies that every user can mount and unmount the file system. defaults specifies that the default options should be used.
Forget about nls=iso8859-1. I should have written iocharset=iso8859-1. This is the default, so it is not needed.
To learn more about mount, take a look at the MAN page.
The permissions are set to rw-rw-rw-
The owner of the files and directories is owner and the group is set to users.
All users are able to mount and un-mount the partition.
The defaults are applied.
Quote:
I tried to mount the filesystem using your code (in a terminal, as root), and it gave me the following message:
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
or too many mounted file systems
Any ideas? I typed in the code exactly as you laid it out.
Make sure that the uid and gid are set to an existing Unix user and group.
If the user or the group does not exist on your system, then you will get an error.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.