LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-11-2011, 03:45 AM   #1
kamaradski1
LQ Newbie
 
Registered: Oct 2011
Location: Currently in Bulgaria
Distribution: Xubuntu, Turnkey-LAMP, Turnkey-CORE
Posts: 22

Rep: Reputation: Disabled
[SOLVED] samba & smbfs mount & strange access issue


Hi all,

I experience some strange inherit access issue on my samba setup and i could use some fresh eye's on it. For a few day's i have been searching for possible solutions however so far no luck.

situation:
i have my mounts declared in fstab, and they mount correctly. Also the user verification seams to work ok.

however when i open the mount in Nautilis browser all files have a lock-icon in front.

in the root of the share i can create and delete files and folders, However if i create a folder i'm not able to put a file or another folder in there and it will display a error about permissions.

Though as root (sudo or su), i do not have a issue and are able to create the needed directory structure without problem. and copy\delete all files & folders i want.

i tried all kind of setup's including but not limiting to:
smb.conf:
- locking = no
- inherit permissions = yes
- force user = root
- create mask on files and directories = 775
- commenting out all not absolutely needed settings

samba server local file system:
- chmod\chown\chgrp mount folder on host

fstab on remote machine:
- mount under different users
- mount with fmask\dmask
- specifically mount with rw flag

current smb.conf:
Code:
[global]
        server string = e3k
        interfaces = 10.0.0.0/255.255.255.192
        security = user
        log file = /opt/var/log/samba/log.%m
        max log size = 256
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        load printers = no
        local master = no
        dns proxy = no
        valid users = root, user-2, user-3, user-4
        hosts allow = 10.0.0.0/255.255.255.192

[e3k-Backup]
        comment = Main storage
        path = /mnt
        guest ok = no
        valid users = root, user-2, user-3, user-4
        read list = user-2, user-3, user-4
        admin users = root
        inherit permissions = yes
        read only = no
        force user = root
        locking = no
fstab Mount:
Code:
//10.0.0.1/e3k-Backup /media/e3k-backup smbfs users,credentials=/etc/samba/credfile.e3k 0 0
credfile:
Code:
username=root
password=somethingvalidandsecret
troubleshooting demonstration:
Code:
kamaradski@Main:/media/e3k-backup$ mkdir test1

kamaradski@Main:/media/e3k-backup$ sudo mkdir test2

kamaradski@Main:/media/e3k-backup$ ls -al
total 4
drwxrwxr-x  5 kamaradski kamaradski    0 Nov 11  2011 .
drwxr-xr-x 13 root       root       4096 Nov 11 00:07 ..
drwxrwxr-x  2 root       root          0 Nov  9 21:19 lost+found
drwxrwxr-x  2 root       root          0 Nov 11  2011 test1
drwxrwxr-x  2 root       root          0 Nov 11  2011 test2

kamaradski@Main:/media/e3k-backup$ mkdir test1/test1

mkdir: cannot create directory `test1/test1': Permission denied

kamaradski@Main:/media/e3k-backup$ sudo mkdir test1/test1

kamaradski@Main:/media/e3k-backup$ ls -al test1/
total 0
drwxrwxr-x 3 root       root       0 Nov 11  2011 .
drwxrwxr-x 5 kamaradski kamaradski 0 Nov 11  2011 ..
drwxrwxr-x 2 root       root       0 Nov 11  2011 test1
Realy hoping anyone knows what is happening here as i'm getting really stuck, and the time-loss on this issue is also getting huge..

At this point any insight is more then welcome, process explanation of whats going on or a straight to the point solution, i need anything just so i can proceed to the next project on my list.

Thanks in advance for your time.
Kamaradski

Last edited by kamaradski1; 11-12-2011 at 01:20 PM. Reason: issue solved
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-12-2011, 07:18 AM   #2
kamaradski1
LQ Newbie
 
Registered: Oct 2011
Location: Currently in Bulgaria
Distribution: Xubuntu, Turnkey-LAMP, Turnkey-CORE
Posts: 22

Original Poster
Rep: Reputation: Disabled
quick update

I have been playing with this a little more:

logging in to the samba share from windows-xp (virtual machine) with any of the user-names, the access levels work as designed.

So the issue is in my local Debian, or in the way i set-up my mounts i guess.

Any tips ?

KR
kamaradski
 
Old 11-12-2011, 01:24 PM   #3
kamaradski1
LQ Newbie
 
Registered: Oct 2011
Location: Currently in Bulgaria
Distribution: Xubuntu, Turnkey-LAMP, Turnkey-CORE
Posts: 22

Original Poster
Rep: Reputation: Disabled
issue solved :)

Ok found the issue, feel kinda stupid now, (isnt that always the case? :s )

For the record:
my issue was caused by not specified group ID of the mount. Therefore the mount was owned by the root account on boot. and thus my user account had very limited possibilities.

Below mount entry in the fstab solved the issue:
Code:
//e3k/e3k-Backup               /media/e3k-backup       smbfs   rw,user,credentials=/etc/samba/credfile.e3k,gid=users 0 0
Cheers guys!

Last edited by kamaradski1; 11-12-2011 at 01:26 PM.
 
2 members found this post helpful.
Old 06-27-2012, 08:48 PM   #4
_tek_
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Thank you!

Thanks bunch for posting your resolution, I greatly appreciate it. In my case I needed to add the uid flag to fstab for my smbfs share and all was well.
 
  


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
integrate Samba PDC & RHDS &DNS &DHCP on one RHEL 5 server marcbachman Linux - Server 1 07-03-2008 01:00 PM
integrate Samba PDC & RHDS &DNS &DHCP on one RHEL 5 server marcbachman Linux - Server 0 07-03-2008 10:49 AM
Suspicious & strange mount problem..?!?!?! Hitboxx Fedora 1 07-03-2007 05:13 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
(strange?) problem with samba & konqueror FlyingDutchman9 Linux - Networking 5 11-08-2004 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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