LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-21-2007, 12:46 PM   #1
MonctonJohn
Member
 
Registered: Aug 2007
Location: Canada
Distribution: Mint
Posts: 112

Rep: Reputation: 15
Question Mount.cifs Mounting a subdirectory of a windows share


Hi all,

I have a Server 2003 box with AD and a Ubuntu Dapper box set up to authenticate users from the server. I have set up pam_mount as well to mount the home directories which is giving me the problem. The permissions on the share is "Province = Read", and "Administrators = Full Control". The share folder is the "Users" folder with sub directories like so: "Users/City/user001" "User/City/user002" etc. Each user has Full Control on their respective home folder, but are not members of the Administrators Group.

To mount the sub directory I first have to mount the share then remount the sub dir with the bind command. Here is the relevant piece from pam_mount.conf:

Code:
volume * cifs server share /home/DOMAIN/&/F uid=&,dir_mode=0750 - -
volume * local - ~/F/CITY/& ~/F uid=&,bind - -
When the user logs in his home dir is mounted properly and even checking the permissions says that he has rwx on anything in the home dir, but when he tries to create any new files he gets an error saying permission denied. Obviously the original share permissions are the ones being used and I don't have the authority to change those.

Is there any way around this problem other than asking someone high up to share every users home dir so they can mount directly to it.
 
Old 09-21-2007, 09:57 PM   #2
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
I guess no, In my opinion its depend the samba cifs session, the session is open by administrator, so everybody read/write it via administrator user account.
If your Linux computer don't have many people use it, u simply force mount it via startup script(But you need to gain the sudo mount permission).
 
Old 09-22-2007, 12:35 PM   #3
MonctonJohn
Member
 
Registered: Aug 2007
Location: Canada
Distribution: Mint
Posts: 112

Original Poster
Rep: Reputation: 15
Thanks for the response kstan,

The share permissions are read-only for the users that will be logging into the Ubuntu machines, however their respective sub dirs have write access. The problem is I can't specify mount.cifs to mount straight to the sub dir, I can only specify that it mount to the share dir then remount with the bind option. The effective permissions are then read-only and not write.

In Windows I can mount a sub directory of a share and gain the permissions assigned to that sub dir. I need the same functionality with Linux. Is there any way of making this happen?
 
Old 09-26-2007, 01:54 PM   #4
MonctonJohn
Member
 
Registered: Aug 2007
Location: Canada
Distribution: Mint
Posts: 112

Original Poster
Rep: Reputation: 15
I have figured this out. Seems in our network after the user logs in I can use the graphical tool nautilus-connect-server to mount the users home folder and have the correct permissions. I guess I didn't need pam_mount after all
 
Old 09-28-2007, 05:15 AM   #5
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
Quote:
Originally Posted by MonctonJohn View Post
I have figured this out. Seems in our network after the user logs in I can use the graphical tool nautilus-connect-server to mount the users home folder and have the correct permissions. I guess I didn't need pam_mount after all
It seems like a good ideal.
 
  


Reply



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
Mount cifs share problems BarryLinux Linux - Newbie 11 06-04-2012 12:42 AM
Can't mount nfs- or cifs-share rw in Debian pingu Linux - Networking 0 07-03-2007 07:43 AM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 11:22 AM
Problem mounting a samba share "CIFS VFS: Send error in SETFSUnixInfo = -5" mrcoffee11 Linux - Software 1 11-07-2006 05:29 PM
no writing permission to mounted cifs share on windows XP ntfs folder zpcanada Linux - General 1 08-30-2006 11:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:41 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