LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-16-2007, 02:48 PM   #1
macele
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Rep: Reputation: 0
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.

Last edited by macele; 12-16-2007 at 03:00 PM.
 
Old 12-16-2007, 05:35 PM   #2
macele
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SAMBA and LINUX File Permissions metallica1973 Linux - Networking 3 07-13-2007 02:24 PM
Samba User / Group Access Permissions Different Between Linux and Win jeyroz Linux - Software 8 01-29-2006 11:26 AM
Samba permissions problem Hans Vanpee Linux - Networking 2 01-27-2006 09:43 AM
Samba Permissions Problem gigglesnorter Linux - Software 0 05-24-2004 04:37 AM
samba and linux file permissions? gene12 Linux - Networking 1 08-05-2002 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:29 PM.

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