Weird Filesystem/mount problem
I use slackware 12 (dual boot with winxp).
I have this weird filesystem/mounting problem. I want to use my own /others as a shared partition that all users can write-read on it. here's my current snippet from my ftsab: Code:
/dev/hda5 /others ext3 defaults,noexec,umask=000 1 2 However, every time I boot I get this kind of message. Code:
EXT3-fs: Unrecognized mount option "umask=000" or missing value Now, whenever I remove the umask=000 option from the /etc/fstab the message above will gone but the files in that partition will be all missing which I know they're there. Instead, there will be 2 directory appears: Recycled and lost+found. Users can still write-read though but my files are "missing". Back to umask=000 option,reboot,mount error message, *poof* Recycled and lost+found disappear, my files in /others reappear again! weird... How to make my /others partition work like now but without the annoying error message? Plz help... |
Per "man mount", it does not appear that "umask" is an option for ext? filesystems, just dos-based ones. I only have one other user on this machine, so I keep my shared documents in a vfat partition, with "uid=bill,gid=users,umask=117", since I don't need any of them to be executable.
Regards, Bill |
Not weird, just need a good explanation of how mounting works (Not that I can provide one) Since umask is not a valid option for a ext3 file system hda5 is not actually getting mounted. You can verify this with the mount command with and with out umask. Since hda5 is not mounted your files are actually being written to the / partition. With the umask option removed /others is now pointing to /hda5 instead of / and magically the files disappear. BTW this is true of any other mounted device.
A lost+found directory is created when you create an ext2/3 filesystem. If hda5 is not mounted your not going to see the directory. If you look at the top of / you will see a lost+found directory if it is an ext3. Mount hda5 to some other mount point and then then copy the files from /others to hda5. You will want to perserve permissions. When hda5 is then remounted to /others you will see your files. |
To expand on what michaelk said, here's basically what you need to do:
First, make sure the /etc/fstab entry for others is what you want (probably the only options you want are "defaults,noexec"). Then: Code:
mv /others/* /someotherplacetemporarily The chmod 3775 makes the mode sgid, which means that any newly created files will be owned by the users group, and also sets the sticky bit, which means that files will only be able to be deleted the owner (or root). Note that the mode also sets it so that the directory is writable by the group. If you want it so that only *some* users have write access, then create a new group and add them to it, and set the directory ownership to that group instead of users. |
Is there any way I can force users to create files only with 777 as the perms ? thats something easy to do with DOS FSs ...
|
Thank you guys for the helpful replies! I followed rworkman's step with addition restore files back to /others from temp directory.
Quote:
to a nasty security issue. I'm still peruse file security also. Some area in linux file permissions make me confused..lol. |
Set the directory group-sticky and all files created in it will be automatically chgrped to that group, but there's no way to force an additive mask on file modes.
|
A couple of suggestions/points. It would probably be better to create your mount point somewhere else besides / -like under /home/others.
Also, mounting partitions is different when using fstab -what I mean is that some options are only avaliable when using an entry in fstab. Compare 'man mount' and 'man fstab' for more info. |
All times are GMT -5. The time now is 06:32 PM. |