Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 09:03 AM.
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:
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 04:10 AM.
Well, then here's a couple of questions for your situation:
What are the permissions and ownership of the drive when it auto-mounts?
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?)
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 08:31 PM.
Reason: Added a question.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.