LinuxQuestions.org
Visit Jeremy's Blog.
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 06-25-2010, 09:58 AM   #1
demontager
LQ Newbie
 
Registered: Apr 2009
Distribution: Ubuntu 10.04 amd64
Posts: 25

Rep: Reputation: 15
SAMBA-can't set permissions


Hello,
I can not manage file/folder permissions for created shares. I need get access from Win system to Linux shares. Actually I have access to its, but only to read folders and files. I tried to change permissions in
create mask = 0765 and set it to 0777, but no success.
Will explain step by step my actions.

1.Added user
# adduser samba
# smbpasswd -a samba #set his password
# smbpasswd -e samba #activating it
2. Installing SAMBA service
sudo apt-get install samba

3. ADDED below lines to /etc/samba/smb.conf


Code:
[global]
   workgroup = WORKGROUP
   security = user 
   server string = %h server (Samba, Ubuntu)
   dns proxy = no  
 log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes

[share]
comment = public_files
path = /home/dem/Desktop/share
valid users = samba
public = no
only guest = no
writable = yes
printable = no
create mask = 0765

[VIDEO]
comment = public_files
path = /media/DATA/VIDEO
valid users = samba
public = no
only guest = no
writable = yes
printable = no
create mask = 0765
P.S.
Folder /home/dem/Desktop/share browseable and I can view files, but not edit/delete.

Folder /media/DATA/VIDEO not browseable and cant't enter it on Win system. It located on USB External HARD Drive, and attached to Linux system.

Last edited by demontager; 06-25-2010 at 10:03 AM.
 
Old 06-25-2010, 01:16 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: Arcadia, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 220

Rep: Reputation: 46
Okay,

So, I am figuring that you are mounting/mapping the share as the user 'samba', right?

Have you tried to add:
Code:
write list = samba
to the share definitions?

HTH. Let us know.

Last edited by ShadowCat8; 06-25-2010 at 01:21 PM. Reason: Added windoze-speak.
 
Old 06-26-2010, 03:18 AM   #3
joshi999
LQ Newbie
 
Registered: Jun 2010
Location: tel aviv
Distribution: ubuntu 10.0.4
Posts: 1

Rep: Reputation: 0
i got the same problemo.
on top of that the netbook running ubuntu 10.04 is completly invisible in the network.
please help the newbie
 
Old 06-26-2010, 05:25 AM   #4
demontager
LQ Newbie
 
Registered: Apr 2009
Distribution: Ubuntu 10.04 amd64
Posts: 25

Original Poster
Rep: Reputation: 15
I have solved half of my problem. Good news: folder "/home/dem/Desktop/share" already writeable, I have edited smb.conf and set local permissions for "/home/dem/Desktop/share" folder.
No good news: I forget to tell that my External USB hard drive got NTFS. That's why I can't set local folder permission for it.
I tried to edit /etc/fstab as follows:
Code:
UUID=35C595D5738A319A       /media/DATA      ntfs-3g      auto,rw,user,nls=utf8 0 0
but no success. I got such error when I inserting USB drive:
http://s49.radikal.ru/i123/1006/74/01021059b40b.jpg
And smb.conf as follows, but it doesn't have influence to mounting:
Code:
[VIDEO]
comment = public_files
path = /media/DATA/VIDEO
valid users = samba
public = no
only guest = no
browseable = yes
writable = yes
printable = no
create mask = 0777
directory mask = 0777

[share]
comment = public_files
path = /home/dem/Desktop/share
valid users = samba
public = no
only guest = no
browseable = yes
writable = yes
printable = no
create mask = 0777
directory mask = 0777
 
Old 07-01-2010, 07:35 PM   #5
ShadowCat8
Member
 
Registered: Nov 2004
Location: Arcadia, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 220

Rep: Reputation: 46
Greetings,

Sorry for the delay in response, but we are finalizing the image of our server product at the office.

@demontager: Did you try to do the mount with 'sudo' yet? Something like:
Code:
~ $ sudo mount /media/DATA
@joshi999: Is your samba running on the Netbook? What do you get when you execute the following commands?
Code:
~$ sudo service smbd status
~$ sudo service nmbd status
HTH. Let us know.
 
Old 07-02-2010, 05:08 AM   #6
demontager
LQ Newbie
 
Registered: Apr 2009
Distribution: Ubuntu 10.04 amd64
Posts: 25

Original Poster
Rep: Reputation: 15
ShadowCat8
I didn't try to mount as "sudo", the main reason- aim to set auto mounting when drive inserted. Actually it auto mounted, but not writeable if I try change something via network, I can browse and read files only. And locally drive writeable. That's why I thought that it possible to set permissions in fstab, but as you see it not works or I have set it wrong.

Last edited by demontager; 07-02-2010 at 05:10 AM.
 
Old 07-09-2010, 09:21 PM   #7
ShadowCat8
Member
 
Registered: Nov 2004
Location: Arcadia, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 220

Rep: Reputation: 46
Okay,

Well, then here's a couple of questions for your situation:
  1. What are the permissions and ownership of the drive when it auto-mounts?
  2. With the 'samba' user as the permitted user to write to the drive, is the samba user able to write to the drive from the system itself? (e.g. While logged in on the system as yourself, have you done a su - samba and then tried writing to a file on the drive?)
  3. Did you try adding the "write list = samba" entry to your smb.conf?

HTH. Let us know.

Last edited by ShadowCat8; 07-09-2010 at 09:31 PM. Reason: Added a question.
 
Old 07-10-2010, 06:33 AM   #8
demontager
LQ Newbie
 
Registered: Apr 2009
Distribution: Ubuntu 10.04 amd64
Posts: 25

Original Poster
Rep: Reputation: 15
1.Regarding permissions on mounted drive:
Code:
gvfs-fuse-daemon on /home/dem/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=dem)
/dev/sdc1 on /media/DATA_ type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
2. When I logged as "samba" user I was enable to write locally on drive.
3. I added write list = samba to smb.conf, but it not works as well.

I found some treads with same issue: http://bbs.archlinux.org/viewtopic.php?id=44844&p=1 and http://www.tuxera.com/community/ntfs-3g-faq/#useroption

As I understand there is no FUSE support for ntfs-3g driver, that means I need to compile FUSE with ntfs-3g to get it works normally.
 
  


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
change samba share permissions using CLI that were initially set with Nautilus lupusyonderboy1 Linux - Server 2 05-27-2009 05:27 PM
Using a Windows XP client to set permissions on a Samba share Wendellz Linux - Software 2 02-09-2007 09:01 AM
Samba domain member server (DMS) group permissions in network with a Samba PDC srosa Linux - Networking 0 05-01-2006 06:55 PM
how to set Samba directory / share permissions rwtreke Linux - General 2 02-16-2006 04:24 PM
Samba: How to set permissions on subfolders for different users. adewri Linux - Software 3 08-25-2003 12:01 PM


All times are GMT -5. The time now is 06:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration