LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-25-2011, 09:42 PM   #1
XGhozt
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Rep: Reputation: 0
Lightbulb 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?
 
Old 04-25-2011, 09:46 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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?
 
Old 04-25-2011, 09:51 PM   #3
XGhozt
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 04-25-2011, 09:57 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.
 
Old 04-25-2011, 10:21 PM   #5
XGhozt
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 04-25-2011, 10:24 PM   #6
XGhozt
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Original Poster
Rep: Reputation: 0
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!
 
Old 04-25-2011, 10:29 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

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


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
mounting a partition as a folder on home diretory manuleka Linux - Newbie 11 06-03-2009 02:31 AM
mixed mounting of automount and fstab in one folder? &different home folder using NIS herofmm Linux - Software 0 04-06-2009 11:00 AM
I can not open the user folder in home and write in a shared folder jorge_ivan Linux - General 8 08-02-2006 11:28 AM
Mounting home folder BruceC Other *NIX 2 09-30-2005 04:12 PM
Mounting a network drive so a normal user can rwx it J.Q. Monkey Linux - Newbie 4 02-20-2004 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:14 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
Open Source Consulting | Domain Registration