LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-13-2009, 11:39 PM   #1
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Rep: Reputation: 17
How to mount a Windows shared directory and have mount point be owned by nonroot user


I'd like to mount a Windows shared directory in a nonroot user's home directory on a Red Hat 5.3 linux machine.

I'll need to have the mounted directory owner and group be for a specific linux user account, let's say user jdoe, the mount point cannot be owned by the root account. If I use the following /etc/fstab line:

//192.168.100.100/share /home/jdoe/winserver guest 0 0

The share will be viewable but /home/jdoe/winserver will have root:root ownership and I need it to have jdoe:jdoe ownership. It's not enough to have 777 permissions on that mounted directory, I actually need it to be owned by jdoe. Why? Long story but it has to be that way trust me. Does anyone know how I can do that? Thanks!

Last edited by Arodef; 09-13-2009 at 11:40 PM.
 
Old 09-13-2009, 11:44 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
That's done on the windows share server.
Then the regular cifs mount will allow the user access.
 
Old 09-14-2009, 12:01 AM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
To amplify what Simon Bridge is saying:
* "ownership" is determined by the SERVER that SERVES the files
* Samba simply "maps" Linux identities. It doesn't *control* them.

So if you want the file owned by "jdoe", by all means - do it. But do it on Windows.

Ideally, you'll also define a Linux user "jdoe", and map the Linux user to the Windows user.

Or maybe you're in an LDAP environment, in which case both Windows and Linux will get the name from LDAP.

"root" needn't (and shouldn't) be part of any of this.
 
Old 09-14-2009, 12:23 AM   #4
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Original Poster
Rep: Reputation: 17
Thanks for the replies.

There's no root user on the Windows server, yet the root is showing up as owning the linux mount point and all files/directores in that shared folder when I use that fstab line I have now. Why is that if there is no user named root on the Windows server?

BTW currently the Windows shared folder does not require any username or password to access it, thus the guest option in the fstab.
 
  


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
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 10:03 AM
Set up rsync to mirror mount on Windows Server to mount point on 2nd internal drive MoMule Linux - Server 4 04-13-2007 09:34 PM
how to mount windows shared folder as normal user lucasm Linux - Software 4 09-28-2006 06:14 AM
Debian normal user cant mount windows shared partition silverstormboy Debian 3 01-14-2005 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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