Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 03-06-2008, 11:00 AM   #1
Registered: Aug 2004
Distribution: opensuse ,debian
Posts: 208

Rep: Reputation: 30
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...
Old 03-06-2008, 11:31 AM   #2
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 507
Blog Entries: 1

Rep: Reputation: Disabled
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.

Last edited by TSquaredF; 03-08-2008 at 10:12 AM.
Old 03-06-2008, 11:51 AM   #3
Registered: Aug 2002
Posts: 16,014

Rep: Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848
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.

Last edited by michaelk; 03-06-2008 at 11:58 AM.
Old 03-06-2008, 01:20 PM   #4
Slackware Contributor
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,211

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
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.
Old 03-07-2008, 10:16 PM   #5
Senior Member
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
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 ...
Old 03-14-2008, 11:23 PM   #6
Registered: Aug 2004
Distribution: opensuse ,debian
Posts: 208

Original Poster
Rep: Reputation: 30
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 View Post
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
Old 03-15-2008, 02:09 AM   #7
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
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.

Last edited by evilDagmar; 03-16-2008 at 04:52 AM. Reason: Probably should have specified "additive" masks from the outset
Old 03-15-2008, 06:40 AM   #8
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,855

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
weird problem with mount/cdrom/symlink stevielawson Slackware 7 03-05-2006 03:27 PM
Weird VFAT mount problem drj000 Linux - Hardware 10 10-28-2005 03:06 PM
weird kernel problem and fs mount problem intense Slackware 5 03-16-2004 12:36 PM
Weird filesystem problem (RH 9) mtraven Linux - General 2 01-16-2004 01:31 AM
weird mount problem scarr3d Debian 3 11-09-2003 07:13 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration