LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mount issue. How do i mount as a different user? (https://www.linuxquestions.org/questions/linux-software-2/mount-issue-how-do-i-mount-as-a-different-user-886707/)

szboardstretcher 06-16-2011 09:11 AM

Mount issue. How do i mount as a different user?
 
Im mounting a directory, that I need to be accessible from a normal user's desktop.

mount -t cifs -o credentials=/root/.creds //192.168.100.226/mountpoint/ /mnt/mountpoint/

But it is giving /mnt/mountpoint permissions as 770, root:1003

How do I change that group to... 501?

ButterflyMelissa 06-16-2011 10:50 AM

Just my loose thoughts...but, how about putting the contents of .creds in a central spot (/opt perhaps?) and make a symlink per user to that spot, chmod the proper rights to it...

By the way, is'nt it somewhat "iffy" to grant a day-to-day user access to the Root's creds? Of course, I can be a wee paranoid at times... :)

But...I am a Linux newbe too (ar'nt we all?) :D

Thor

szboardstretcher 06-16-2011 11:14 AM

and the answer is:

Code:

mount -t cifs -o uid=500,gid=500,credentials=/root/.creds //192.168.100.226/dir/ /mnt/dir/

szboardstretcher 06-16-2011 11:15 AM

Quote:

Originally Posted by Thor_2.0 (Post 4387640)
Just my loose thoughts...but, how about putting the contents of .creds in a central spot (/opt perhaps?) and make a symlink per user to that spot, chmod the proper rights to it...

By the way, is'nt it somewhat "iffy" to grant a day-to-day user access to the Root's creds? Of course, I can be a wee paranoid at times... :)

But...I am a Linux newbe too (ar'nt we all?) :D

Thor

The username/password is in the .creds file, which I do not want accessible by other users. So, root owns it. I'm mounting the dir as root, but allowing a regular user to access it.

Thanks for the help.

ButterflyMelissa 06-16-2011 11:36 AM

Thanks dude :) I learned something here! You lit up my day!

Thor


All times are GMT -5. The time now is 05:11 PM.