LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Mount.cifs Mounting a subdirectory of a windows share (https://www.linuxquestions.org/questions/linux-networking-3/mount-cifs-mounting-a-subdirectory-of-a-windows-share-586388/)

MonctonJohn 09-21-2007 12:46 PM

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.

kstan 09-21-2007 09:57 PM

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).

MonctonJohn 09-22-2007 12:35 PM

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?

MonctonJohn 09-26-2007 01:54 PM

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 :)

kstan 09-28-2007 05:15 AM

Quote:

Originally Posted by MonctonJohn (Post 2904641)
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.


All times are GMT -5. The time now is 04:08 PM.