LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-01-2004, 11:52 AM   #1
digi691
LQ Newbie
 
Registered: Aug 2004
Location: Chicago
Posts: 17

Rep: Reputation: 0
Unhappy Permissions for second hard drive


Ok no matter what i change in my fstab or change permissions of the mount point of /opt2 a user cannot write but i can cruise the directory. I will post my fstab and a read out of ls -lac of opt2. I want users to have read write and execute. I have only been able to copy files as root.

/dev/hda1 / ext3 noatime 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda6 /home ext3 noatime 1 2
/dev/hdc /mnt/cdrom auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0$
/dev/hdd /mnt/cdrom2 auto umask=0,user,codepage=850,iocharset=iso8859-1,noauto,$
/dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,sync,codepage=850,noauto,exe$
/dev/hdb1 /opt2 ext3 rw,noatime 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0

(This is the Permissions of /Opt2 which is my second hard drive)
drwxr-xr-x 4 root root 4096 Sep 1 10:21 ./
drwxr-xr-x 20 root root 4096 Sep 1 10:35 ../
drwx------ 2 root root 16384 Sep 1 00:17 lost+found/
drwxr-xr-x 66 root root 4096 Sep 1 02:18 Music/
 
Old 09-01-2004, 12:49 PM   #2
R0UTE
LQ Newbie
 
Registered: Aug 2004
Location: England
Distribution: College Linux
Posts: 8

Rep: Reputation: 0
Hi, I am having a similar problem for a second partition on my hard drive os i thought i'd stick it in the same thread.
I resized an NTFS partition (to make it smaller), I then went back into Linux and did
mkfs -t ext3 /dev/hda3
which worked fine then created a directory /mnt/stuff and tried (as root)
mount -t ext3 /dev/hda3 /mnt/stuff
This worked fine and i could browse it as root, obviously not as a normal user though
so unmounted it and tried
mount -t ext3 /dev/hda3 /mnt/stuff -o uid=r0ute
and got the good old mount error message :
mount: wrong fs type, bad option, bad superblock on /dev/hda3,
or too many mounted file systems
I know it is not the wrong fs type, the option is fine (uid=r0ute works fine as it does not have to be the uid value although i have tried this also to no avail), there is not a bad superblock as it mounts fine for root and there are not too many mounted file systems.
Anyone have any idea why i might be getting this ?
I've been trying this on and off for about a week with no luck.
Any help much appreciated!
 
Old 09-01-2004, 01:35 PM   #3
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
mabe try this instead of : /dev/hdb1 /opt2 ext3 rw,noatime 0 0
put in : /dev/hdb1 /opt2 ext3 rw,users,umask=000,noatime 0 0

egag
 
Old 09-01-2004, 02:08 PM   #4
digi691
LQ Newbie
 
Registered: Aug 2004
Location: Chicago
Posts: 17

Original Poster
Rep: Reputation: 0
when i do that i get this error on the boot up and when i try to mount it after the system boots:

mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
or too many mounted file systems

I am also running Mandrake 10.0 if that helps any.

didge
 
Old 09-01-2004, 06:10 PM   #5
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well...i'm at a win-pc, cannot check, but what is the ''noatime'' option mean,
i mean , i don't have it in my fstab.....?

egag
 
Old 09-01-2004, 06:29 PM   #6
digi691
LQ Newbie
 
Registered: Aug 2004
Location: Chicago
Posts: 17

Original Poster
Rep: Reputation: 0
I don't know but i noticed it in my other partitions so i put it in there.

didge
 
Old 09-01-2004, 06:59 PM   #7
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
maybe you can check '' man fstab '' or so to see what it means ??
( type '' q '' to leave the ''man '' command )
or remove the '' noatime '' option to try...

egag

Last edited by egag; 09-01-2004 at 07:12 PM.
 
Old 09-01-2004, 09:19 PM   #8
digi691
LQ Newbie
 
Registered: Aug 2004
Location: Chicago
Posts: 17

Original Poster
Rep: Reputation: 0
/dev/hdb1 /opt2 ext3 rw,users 0 0

I changed it to this and still do no have access. I read man fstab and man mount. By looking at it i should only need rw, and users. I can cruise the directory but i cannot delete or save anything to opt2. Any help would be appreciated.

didge
 
Old 09-02-2004, 06:04 AM   #9
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
reading man-mount:

'defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.'

i think it should be :

/dev/hdb1 /opt2 ext3 defaults,user,exec 0 0

but i'm not sure. ( maybe just try )

egag
 
Old 09-02-2004, 06:27 AM   #10
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well. i've been fiddling around, trying diff. settings. the above is nogood.
now i'm curious too....

egag
 
Old 09-02-2004, 11:23 AM   #11
digi691
LQ Newbie
 
Registered: Aug 2004
Location: Chicago
Posts: 17

Original Poster
Rep: Reputation: 0
Yea i have been messing around with this all day yesterday and have not got anything to work. If anyone else might have an idea please post.
 
Old 09-02-2004, 12:23 PM   #12
sketelsen
Member
 
Registered: Jul 2003
Location: Olympia WA
Distribution: Gentoo Kernel 2.6.8-gentoo-r3; AMD Athlon XP 2200+
Posts: 63

Rep: Reputation: 15
Hey folks, i think i may have a solution for you.

First of all, if it tells you the filesystem is the wrong type, then it probably is.

/dev/hdb1 /opt2 ext3 rw,users 0 0


That's your filesystem type listed, ext3. if the filesystem on the drive is actually ext2 or reiserfs, that won't work. Figure out what filesystem you're actually using, and put the right id in there. Hint: if it's a windows hard drive it's either vfat or ntfs.

Second, /opt2, i don't think, should be used as a mount point, from a filesystem standpoint. I usually mount my stuff on /mnt/hda1 or /mnt/media or /mnt/win. if, for simplicity, i want to mount something on /media instead of /mnt/media, i'll still mount it at /mnt/media, but symlink the directory to /media, like this:

ln -s /mnt/media /media

(basically, ln is link. -s means symbolic link. the first argument, /mnt/media, is where the file or directory actually is. the second argument, /media, is where you want the filesystem to pretend to be.)

/mnt is where drives belong, period.

Next, your permissions. the "right" way, for security purposes, is to create a group where you can put users you want to access this drive. for instance, on my machine, i have a windows partition. so i have a group called "win." to add the group, just type (as root)

groupadd win

Then, you can go into your /etc/group file, take note of the number that was assigned to the group (you'll need it in a minute), and next to the name of the group, after the colons, type in the list of users you want to access your drive. kind of like this:

125::win:bob,jane,carol

make sure you save the file. now, in your fstab, the drive will look like this:

/dev/hda2 /mnt/win vfat gid=125,umask=002,rw 0 0

or something to that effect. you'll change the first argument to whatever device you're trying to mount, the second argument to the mount point, the third argument to whatever fileystem type you're ACTUALLY using. gid is the group id number. the umask tells mount to mount the filesystem so that only the group has access (i think). the rw means read-write, and the 0 and the 0 are dump/pass variables. I have no idea what they do. :-)

once you fix the fstab entry, save /etc/fstab, unmount the filesystem:

umount /dev/hda1 (or whatever)

and then remount it:

mount /dev/hda1

it should have the correct permissions. now, get the hell out of root, and try to navigate to the mounted directory:

cd /mnt/win

it *should* say now that you have permission, and you can do whatever you want from there.

Good luck, and lemme know if you have any problems.

Last edited by sketelsen; 09-02-2004 at 12:27 PM.
 
Old 09-02-2004, 12:36 PM   #13
sketelsen
Member
 
Registered: Jul 2003
Location: Olympia WA
Distribution: Gentoo Kernel 2.6.8-gentoo-r3; AMD Athlon XP 2200+
Posts: 63

Rep: Reputation: 15
another note: what i wrote above only applies if you're using the drive as some sort of extra storage. if you want it to be a working part of your system, like you're migrating /usr or /var or something to a new hard drive to free up space, then you should keep the permissions AS THEY SHOULD BE, as they were assigned by the system. you don't want regular users running around writing files in your /usr or /var partitions.
 
Old 09-02-2004, 05:18 PM   #14
digi691
LQ Newbie
 
Registered: Aug 2004
Location: Chicago
Posts: 17

Original Poster
Rep: Reputation: 0
Still a no go....... Anytime i added anything besides rw it will give me a wrong fs, bad block yadda yadda yadda. I can mount it as root w/ rw permissions in my fstab and thats about it. i made it look exactly like yours except for the fact that it was hdb1. I even repartioned it and reformatted it. Its always one thing or another when i switch distros...... I have been through pretty much all the distros and this one i kinda like but there is always a funky thing like this.... or wierd little quirks.
 
Old 09-02-2004, 05:20 PM   #15
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
maybe confused.... i think you need something like:
chmod <option> 777 /opt2
option should change perm. of all files and subdir's.
cannot check now, ( man chmod )

egag
 
  


Reply


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
Hard Drive Permissions djljjm Linux - Newbie 2 04-22-2005 03:00 PM
Hard Drive Permissions djljjm Linux - Newbie 3 04-18-2005 04:35 PM
Hard Drive Permissions djljjm Linux - Newbie 1 04-18-2005 12:29 PM
Hard drive permissions R¬dical_úD SUSE / openSUSE 3 01-10-2005 08:20 AM
hard-drive permissions Airburned Linux - General 4 07-13-2003 01:10 PM


All times are GMT -5. The time now is 07:05 AM.

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