Problems with chmod and chgrp
I'm having trouble changing permissions for a partition I have. I'm using Slackware 9.1 and the partition is a FAT32 data partition mounted at "/win_d". The problem is it's only accessible by root. I've tried to change the permissions with "chgrp users win_d" which gives me a "Operation not permitted" error and "chmod 777 win_d" which give no error but doesn't work. What am I missing? I have gone over the tutorial but I'm still uncertain as to what I'm doing wrong.
|
You probably have to change the way the partition is mounted in fstab to let other users access it.
I am not too sure all my auto mounted partition are accessable to everyone, can you show me the fstab entry for that mount? |
Windows paritions don't actually have permissions. Its actually controlled by the moust command and the /etc/fstab file for Linux. Try setting the umask. see the man page for mount or fstab.
|
Quote:
/dev/hda7 swap swap defaults 0 0 /dev/hda6 / reiserfs defaults 1 1 /dev/hda8 /usr/local reiserfs defaults 1 2 /dev/hda1 /win_c vfat defaults 1 0 /dev/hda5 /win_d vfat defaults 1 0 /dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 proc /proc proc defaults 0 0 I find that man pages are confusing to interpert clearly, is there a link to a tutorial on these forums that explains fstab and umount with the same clarity that the chmod tutorial I linked to above does? addendum: Thanks for the quick replies. :) |
What do you mean that its only accessable by root? Can the other users see it but just can't change anything on it??
|
/dev/hda1 /win_c vfat defaults 1 0
/dev/hda5 /win_d vfat defaults 1 0 The important thing here is the options. defaults is good for linux but not for windows. try /dev/hda1 /win_c vfat rw,user,noauto,mode=777 0 0 /dev/hda5 /win_d vfat rw,user,noauto,mode=777 0 0 This will mount the drives as read-write, allow normal users to mount the file system, don't mount this at boot, and make it appear all the files have a mode of 0777. |
Quote:
|
Quote:
|
The first of thoose zeros is for the dump command, its a backup program, and this zero marks whether this patition needs to be dumped.Only the linux partitions should have a 1, all others get a 0.
The second zero is for fsck, and marks whether this partition should be checked at startup. ( the root partition should be marked 1, all others should be 2, apart from the ones that don't need checking which get a 0 ). |
Thanks again. Is there a listing in a man page I can look for that shows what the defaults for the various partition formats are? I'd like to see what vfat gets set at automatically other than knowing it's "default". The umount man page tells me what my options are, but not the predefined defaults.
|
The default options for every filesystem is:
rw,suid,dev,exec,auto,nouser,async Other options for vfat are give in the manpage for mount. |
Thanks. I made the changes as you suggested and got read and execute permissions only, no write outside of root. So as SuperUser I "chmod 777 win_d" -ed and got write access. But now that I have permission to access the partition nothing appears in it. I'm thinking I have read access to the partition but none of the files or subdirectories in it. Aren't they supposed to come along by default? I tried to fix it with "chgrp users win_d" as root and it now shows the group ownership as "users" but that didn't solve it.
|
mount it as the user, this should give you write permissions, or try the option suid.
|
edit: I had another question but I think I've already got the answer. Feel free to delete this post moderators.
|
All times are GMT -5. The time now is 05:38 AM. |