-   Slackware (
-   -   Weird Filesystem/mount problem (

hottdogg 03-06-2008 12:00 PM

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:

/dev/hda5        /others          ext3        defaults,noexec,umask=000  1  2
well, because of this users can write-read and I can see files on this partition.So far so good.

However, every time I boot I get this kind of message.

EXT3-fs: Unrecognized mount option "umask=000" or missing value
mount: wrong fs type, bad option, bad superblock on /dev/hda5

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...

TSquaredF 03-06-2008 12:31 PM

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.

michaelk 03-06-2008 12:51 PM

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.

rworkman 03-06-2008 02:20 PM

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:

  mv /others/* /someotherplacetemporarily
  mount /others
  chown root:users /others
  chmod 3775 /others

That will set directory ownership to root with group users.
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.

duryodhan 03-07-2008 11:16 PM

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 ...

hottdogg 03-15-2008 12:23 AM

Thank you guys for the helpful replies! I followed rworkman's step with addition restore files back to /others from temp directory.


Originally Posted by duryodhan (Post 3081694)
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 ...

duryodhan, I don't know how, should be possible I guess. But it could lead
to a nasty security issue.
I'm still peruse file security also. Some area in linux file permissions make me

evilDagmar 03-15-2008 03:09 AM

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.

gnashley 03-15-2008 07:40 AM

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 10:59 PM.