SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I've been trying to access two windows partitions from linux. I can access both drives using root but I want to be able to access them from other user accounts.
When trying to access both folders from a user account I get a message saying I don't have the permission. I have tried adding umask 000 to each but that doesn't seem to make any difference. Here are the folder permissions:
(When drives are mounted)
drwxr-xr-x 2 root root 48 Mar 16 2002 cdrom
drwxr--r-- 7 root root 2048 Dec 15 21:01 fat
drwxr-xr-x 2 root root 48 Mar 16 2002 floppy
drwxr-xr-x 2 root root 48 Mar 16 2002 hd
dr-x------ 1 root root 12288 Dec 13 16:46 personal_xp
drwxr-xr-x 2 root root 48 Dec 15 18:14 test
(When drives are not mounted)
drwxr-xr-x 2 root root 48 Mar 16 2002 cdrom
drwxrwx--- 2 root users 48 Nov 30 16:23 fat
drwxr-xr-x 2 root root 48 Mar 16 2002 floppy
drwxr-xr-x 2 root root 48 Mar 16 2002 hd
dr-xr-x--- 2 root users 48 Dec 5 23:54 personal_xp
drwxr-xr-x 2 root root 48 Dec 15 18:14 test
I know the problem is with permissions but I don't know linux well enough yet to know what the problem is
Reason being, I don't think you'll need to set the fsck passno to yoru FAT partitions. Another thing, the auto mounting will set the owner of these partitions as root, and thus other users can't view them (at least I think so... so don't take this as fact).
7) Say your prayers... and on to the test... Try running /etc/rc.d/rc.autofs start Hopefully there's no error messages.
8) Now try (as a normal user) doing this: cd /mnt/fat Hopefully you'll be in your FAT partition now. Try creating a file or something. Do you have write access?
alrighty, sorry it took so long for me to get back, here are the results:
starting rc.autofs:
Code:
Starting automounter:.
getting status:
Code:
Configured Mount Points:
------------------------
Active Mount Points:
--------------------
stopping rc.autofs
Code:
Automounter not running
After running rc.autofs start I tried to access the partitions. Neither were mounted by the automounter so I must be doing something wrong.
Upon closer examination of the rc.autofs file, a list of mounted partitions is supposed to be listed when the automounter is first run (ie. after "starting automounter:") but this doesn't happen.
I created the two files auto.master & auto.winmounts and placed the given code in each. I believe the problem occurs in the rc.autofs file in the getmounts() method where it determines which partitions to mount.
I'm gonna keep fiddling with it and see what I can come up with, let me know if you have any ideas
ok, never mind that problem, I somehow got it working. The 2 drives mount ok at boot but I can't access them unless I am logged in as the root user. Do I have to add another mounting option to the auto.winmounts file indicating that it may be accessed by all users?
Originally posted by kierse ok, never mind that problem, I somehow got it working. The 2 drives mount ok at boot but I can't access them unless I am logged in as the root user. Do I have to add another mounting option to the auto.winmounts file indicating that it may be accessed by all users?
thanks
Kierse
This shouldn't be an issue at all... I've tested this setup many many times before. Normal users should have no problems accessing an auntomount point.
Have you made any modifications to the settings... by stating "somehow got it working" I assume you did, and I hope that you document your changes and understand what you're doing.
The original setup that I gave you is guaranteed to work first time, everytime. You just won't "see" the dirs that are supposed to be your mountpoints... just go ahead and type cd /mnt/fat (as a user) eventhough it's not there.
All I did to enable other users to mount Windoze drives, was add with uid and gid
to FSTAB
/dev/hdb1 /WinD vfat users,uid=XXX,gid=YYY,rw 0 0
YYY was a new group I set up, and XXX was a member of that group along with root
have a potch with those settings, config to your needs. Add noauto if you dont want it mounted @ boot time. I only have 1 other user besides root on my system, so above works for me, if u have more users then read man fstab, search web etc
When I said "somehow got it working" I meant that after I trying a couple of things that didn't seem to work, I replaced the modified file with a copy of the original.
I tried it again and I am still having the same problem: When I am logged in a root the two mounted partitions are accessable. When I am logged in as another user I don't have the permission to access the two partitions
ie. typing
1. cd /mnt/fat or
2. cd /mnt/personal_xp
throws an error saying that I don't have the permission to acces the folder. when I view the folders owner/group it shows root for both. I don't understand why this is happening. Both floppy and cdrom in the mount dir are owned/part of root group yet I can access both
I am not sure why they talk about autofs, just modify /etc/fstab, and change the line of windows partition as "umask 0 0 0" or "umask 022 0 0"(just read permission), like
/dev/hda7 /mnt/vfat vfat defaults, umask=022 0 0
I are just figuring out how to automount (supermount) my flashdisk and cdrom., which has been a real problem for my wife for mounting&umounting in the linux.
I suggested autofs because kierse wants the partition to be available to everyone after boot. I'd use the "normal" fstab method myself... but somehow it doesn't work for him.
Since what he wants is an on-demand automounting schema, I suggested autofs because I have done a project requiring something similar (actually slightly more complex, mounting ISO images as filesystem via samba).
The strange thing is, my setup works even as normal user whereas he has problems with it using non-root accounts. This is something I have never faced at all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.