Red Hat This forum is for the discussion of Red Hat 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-25-2011, 09:42 PM
|
#1
|
LQ Newbie
Registered: Nov 2010
Posts: 9
Rep:
|
Mounting network drive under a user's home folder, possible?
This is the command I tried using:
Code:
mount -t cifs //NAS1/reports /home/user/public_html/reports -o rw,umask=0338,uid=587,gid=584,username=admin,password=password
It looks like the user can't access the files on the NAS drive. Is there any way to do this?
|
|
|
04-25-2011, 09:46 PM
|
#2
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Your umask is wrong. The umask is given in octal numbers, there can't be an 8 in it. This may be the culprit. Have you checked the UID and GID for correctness?
Which error messages do you get?
|
|
|
04-25-2011, 09:51 PM
|
#3
|
LQ Newbie
Registered: Nov 2010
Posts: 9
Original Poster
Rep:
|
What should the umask be? I tried 0000, and there was no change. There isn't an error message, the drive is mounting correctly but the problem is that to the user it's just a regular empty folder. If I login as root and change to the mounted directory then I see the files from the network drive. Also, yes I'm sure the UID and GID are correct.
|
|
|
04-25-2011, 09:57 PM
|
#4
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
The umask should be set opposite as you would set file permissions. If you want 755 as file permission the umask should be 022.
To your other problem: I have never seen such behavior, so I would try to play a little with the options, try it without the umask,GID and UID.
|
|
|
04-25-2011, 10:21 PM
|
#5
|
LQ Newbie
Registered: Nov 2010
Posts: 9
Original Poster
Rep:
|
Is it even possible for a non-root user to access a mounted drive? It seems like that's the problem.
I've attached a screenshot (EDIT: REMOVED), hopefully this helps better illustrate the problem.
If I don't specify the uid and gid then everything is owned by root.
Last edited by XGhozt; 04-25-2011 at 10:25 PM.
|
|
|
04-25-2011, 10:24 PM
|
#6
|
LQ Newbie
Registered: Nov 2010
Posts: 9
Original Poster
Rep:
|
Actually, I think it IS working. If I login with FTP as the user then the files show up.
I suppose it just doesn't show that way from shell.
Very odd, thanks a lot TobiSGD!
|
|
|
04-25-2011, 10:29 PM
|
#7
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
As stated before, I have never seen such a behavior. I myself mount my fileserver via cifs and are perfectly able to access it as normal user.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 02:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|