LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2010, 10:44 PM   #1
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Root can't chown mount point for samba share?


I've fixed this in what seems an inelegant manner, and I'd like to know a proper way to do it.

The situation:
I have a samba share that I mount locally at boot through fstab. The share is writable and if I access the share directly, say with konqueror and smb (smb://hostname/sharename) then I can do anything I want (create, write, delete, edit, files/directories). I have a mount point on my local machine
Code:
/shares/mp3
and I (username dtest) was unable to do anything except read files and create directories trying to do them to the local mountpoint except as root. I figured it would be a matter of
Code:
chown -R dtest /shares/mp3
but I was unable to do that even as root, I kept getting permission denied. When I did
Code:
ls -alt /shares/
it told me the owner was 1000 and the group was root. Dtest was already a member of the root group and I was able to
Code:
chmod -R 774
as root but I still couldn't do anything except read and create directories directly via the mountpoint.

Ultimately I solved this by changing the uid of user dtest via kuser and then just chowning my home directory back to dtest. It seems like as root I should be able to change the owner of the directory. I know it's because this is a samba share, but it doesn't make any sense why root couldn't just chown it. Is there another way to change the owner of a directory, or is this set by the machine hosting the samba share?

EDIT: the uid of the owner of the share on the hosting machine is 1000.

Last edited by damgar; 05-30-2010 at 10:45 PM.
 
Old 05-30-2010, 10:53 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
samba allows windows networking for unix/linux. windows networking is inelegant. Specific to your issue: it does not support unix permissions. Who gets write access is usually handled by the server, not the filesystem.
 
1 members found this post helpful.
Old 05-30-2010, 11:10 PM   #3
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949

Original Poster
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by Simon Bridge View Post
samba allows windows networking for unix/linux. windows networking is inelegant. Specific to your issue: it does not support unix permissions. Who gets write access is usually handled by the server, not the filesystem.
Yes, after much borking, I figured out that it was the share owner's uid from the server that was being transmitted. I was able to bring everything in line by changing the uid of the user on the server and chowning on that side since it's much less complicated with just a few directories and no gui to have to worry about and then restoring my user's setting on the local machine.

I think I need to figure out how to authenticate on the network and how to set up nfs. It seems more linux-like to have a little more setup and then not have to look back.
 
Old 06-01-2010, 03:03 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I've been noticing more interest in nfs for a while now. I use it for system critical things which I can rely on to be in one place. I only use windows networking for mobile devices.

There are a whole host of collaboration tools for gnu/linux too. But if all you are actually interested in is sharing files to authenticated users, you may only need ssh - give everyone an account on the server. From there it gets as big as you need.
 
  


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 On
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
Unable to add Samba share mount point with Mandriva 2008.1 Clived Mandriva 6 05-19-2008 03:31 PM
mount NFS to mount point then share out the mount point ionic_slim Linux - Networking 2 04-20-2008 12:17 PM
Mount windows/samba share as non root user stuartornum Linux - Newbie 3 01-22-2008 11:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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