Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Weird samba permissions issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Zyzzyva100
Apprentice
Apprentice


Joined: 08 Aug 2005
Posts: 193

PostPosted: Wed Nov 29, 2006 10:10 pm    Post subject: Weird samba permissions issue Reply with quote

So I just setup a server to serve up files on my local network (its running ubuntu). I setup samba via SWAT, and control everything else via ssh since the machine is headless. I finally got around to setting up the shares to mount on my system at boot via fstab. I am using CIFS, and authenticate by having a credentials file in my home folder (set to 0600) so that my password is not in a shared plaintext file.

I have set myself to be the owner of the top level folder the shares are in, and even set that folder to 777 (its just media, and my network is closed other than to my fiancee and I). The weird thing is that when I create a new folder via the share (locally, on my computer), the owner comes up as root, and I have no permissions to put anything in that folder until I chmod or chown it.

Being new to working with volumes mounted that are on a remote system, am I doing something wrong here? Or is this just how it works? Even if I own the folder in which I create a new folder, the owner goes to root, and the group goes to 1000 automatically.

Here is the line in my fstab if that helps:
Code:

//porky/media           /mnt/remotemedia        cifs            auto,rw,credentials=/home/tom/.auth.txt         0 0


And here is the relevant part of the smb.conf from the fileserver:
Code:

[media]
        path = /mnt/storage2/
        valid users = tom, angela
        admin users = tom
        read only = No
Back to top
View user's profile Send private message
Zyzzyva100
Apprentice
Apprentice


Joined: 08 Aug 2005
Posts: 193

PostPosted: Thu Nov 30, 2006 2:02 am    Post subject: Reply with quote

Incidentally, when I am connected via samba with my macbook, I am able to make new folders and write to them without problem. So, I don't think the problem is server side, but the problem is with my desktop configuration (the gentoo box).
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Fri Dec 01, 2006 2:38 am    Post subject: Reply with quote

who owns the files when you create them with the macbook?
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
Zyzzyva100
Apprentice
Apprentice


Joined: 08 Aug 2005
Posts: 193

PostPosted: Fri Dec 01, 2006 3:43 am    Post subject: Reply with quote

Root still owns them when I transfer over from the macbook (so maybe the macbook is just ignoring permissions?).

When I create a new folder from my desktop, root owns then, and the group is 1000. Is there anyway to make this cifs mount behave like a normal local partition (ie one in which folders I create are owned by me?) Being new to this, I just can't seem to figure it out.
Back to top
View user's profile Send private message
Zyzzyva100
Apprentice
Apprentice


Joined: 08 Aug 2005
Posts: 193

PostPosted: Fri Dec 01, 2006 10:32 pm    Post subject: Reply with quote

Anyone else have any ideas?
Back to top
View user's profile Send private message
Zyzzyva100
Apprentice
Apprentice


Joined: 08 Aug 2005
Posts: 193

PostPosted: Mon Dec 04, 2006 4:36 am    Post subject: Reply with quote

Well I found a way around this, but I wouldn't exactly call it solved, because it is a bit of a hack. It seems the problem was that since I was mounting via fstab. This seems to make it so that even though I own the local and remote folders, the share is mounted as root, so if I create a new new folder or try to copy over a folder, that folder is immeadiately owned by root.

Since I can't seem to figure out how to get around that, I just mount the shares via smbmount using a script in the KDE autostart folder.

However, this has several drawbacks, namely that I can no longer user CIFS, and instead am back to using samba. So, now that I actually know what my problem is, does anybody know how to fix this?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum