Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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!
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...
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.
Distribution: Gentoo Kernel 2.6.8-gentoo-r3; AMD Athlon XP 2200+
Posts: 63
Rep:
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.
Distribution: Gentoo Kernel 2.6.8-gentoo-r3; AMD Athlon XP 2200+
Posts: 63
Rep:
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.
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.
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 )
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.