LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Yet another samba problem. Linux <-> Linux permissions (https://www.linuxquestions.org/questions/linux-newbie-8/yet-another-samba-problem-linux-linux-permissions-607158/)

macele 12-16-2007 02:48 PM

Yet another samba problem. Linux <-> Linux permissions
 
OK, so let me explain a little about my set-up. I have a file server with 6 hard drives in it. Some of these drives are mounted and symlinked into a folder that is shared via samba. Now I had a problem with samba not following symbolic links so to fix that problem I had to disable unix extensions. (I found that solution here) Now though a new problem has manifested itself. I can mount and read anything I want, but when I try to copy a folder and it's contents to one of the shares I get a an error. The folder is created, but it won't create any of the item contained inside the folder. Once the initial error occurs I can then copy contents into the folder but not in a single operation. Here is what I get:

Code:

[macele@localhost ~]$ cp -r Desktop/testfolder/ /mnt/net/storage/250a/
cp: cannot create regular file `/mnt/net/storage/250a/testfolder/large_test.avi': Permission denied

It creates the folder, but not the file inside. Here is a ls -l of the folder that was created on the server:

Code:

drwxrwxrwx  1 root root          0 Dec 16 14:31 testfolder/
so if the permissions where 777 then why did it fail?

My smb.conf from the server:

Code:

macele@serv:~$ cat /etc/samba/smb.conf
      [global]

      workgroup = OLYMPUS
      server string = Server to the Olympians (Ubuntu)
      security = user
      log file = /var/log/samba/log.%m
      socket options = IPTOS_LOWDELAY TCP_NODELAY
      local master = Yes
      preferred master = Yes
      dns proxy = No
      name resolve order = lmhosts host bcast
      debug level = 1
      create mask = 0777
      directory mask = 0777
      unix extensions = no
      force user = macele
      force group = macele

      [homes]
      comment = Home Directories
      browseable = no
      read only = no
      valid users = %S
      ;invalid users = root bin daemon nobody named sys tty disk mem kmem users

      [storage]
      path = /share
      available = yes
      browsable = yes
      public = yes
      writable = yes
      guest ok = no

      [tmp]
      comment = Temporary File Space
      path = /tmp
      read only = No
      valid users = admin
      invalid users = root bin daemon nobody named sys tty disk mem kmem users

[Storage] is the share im talking about. And I have no idea what the problem is here.

I am mounting the filesystem with these parameters:

Code:

//192.168.1.31/storage /mnt/net/storage cifs credentials=/root/.smbcredentials,file_mode=0777,dir_mode=0777, 0 0
I can't find anything helpful from the logs, but I'll post what it shows for the sake of completeness.

smb log:
Code:

macele@serv:~$ tail /var/log/samba/log.192.168.1.30
[2007/12/16 14:11:46, 1] smbd/service.c:make_connection_snum(950)
  192.168.1.30 (192.168.1.30) connect to service storage initially as user macele (uid=1000, gid=1000) (pid 12773)
[2007/12/16 14:13:34, 1] smbd/service.c:close_cnum(1150)
  192.168.1.30 (192.168.1.30) closed connection to service storage
[2007/12/16 14:13:37, 1] smbd/service.c:make_connection_snum(950)
  192.168.1.30 (192.168.1.30) connect to service storage initially as user macele (uid=1000, gid=1000) (pid 12954)
[2007/12/16 14:28:39, 1] smbd/service.c:close_cnum(1150)
  192.168.1.30 (192.168.1.30) closed connection to service storage
[2007/12/16 14:28:42, 1] smbd/service.c:make_connection_snum(950)
  192.168.1.30 (192.168.1.30) connect to service storage initially as user macele (uid=1000, gid=1000) (pid 14125)

You guys have been very helpful to me in the past, and I would appreciate any help you can give me on this little problem.

Thx

Perhaps this should have gone into the Linux - Server board but I'm also kind of a newbie, so I just went with newbie. Sorry if this thread landed on the wrong board.

macele 12-16-2007 05:35 PM

Well I sort of solved my problem... more of a workaround really. Rather than use symlinks to the drives I wanted shared I simply dropped a --bind mount into the fstab. With unix extensions turned on symlinks are broken, but bind mounts are not. That allowed me to enable unix extensions which fixed the strange permissions problem I was having. However, my uids are too different to work without passing the "noperm" parameter to mount.cifs in the fstab.

I really wish I knew what was going on with that though... very strange.


All times are GMT -5. The time now is 04:26 AM.