[SOLVED] can cant setup persmssion to write to my samba share folder from win7 machine
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.
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Rep:
can cant setup persmssion to write to my samba share folder from win7 machine
totally new to linux btw
i set up samba per this... https://help.ubuntu.com/11.04/server...ileserver.html
i can browse the folder from my win7 machine but i cant move files to it or edit the files in samba/share from win machine
i want to move all my media files from my win7 machine to my ubuntu server
what am i doing wrong?
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
ah, thanks!
so i'm reading up on SELinux and "samba_export_all_rw"
i believe the stuff i'm reading is assuming the reader knows more about linux that i do
do i add "samba_export_all_rw" into smb.conf or what?
do you know?
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
yeah, it has a section of notes at the top on SELinux which my conf file doesn't have
when i add the line
setsebool -P samba_export_all_rw on
testparm says it's ignorning the badly formed line
# Use the samba_export_all_ro or samba_export_all_rw Boolean to share system
# directories. To share such directories and only allow read-only permissions:
# setsebool -P samba_export_all_ro on
# To share such directories and allow read and write permissions:
# setsebool -P samba_export_all_rw on
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
found this in another forum
'chmod 777 [Foldername] -R'
worked!!
I'm researching what chmod 777 is and i see peeps saying things like...
it a bit of a security risk, if you have to use it authentication are not properly configured, you can create folders but cant delete them (i havent tried yet i'm just moving files right now)
do i add "samba_export_all_rw" into smb.conf or what?
do you know?
No.
"setsebool -P samba_export_all_rw on" is a command that needs to be run as root if you are having selinux/samba conflicts. on my machine selinux usually tells me of any conflicts and suggests solutions.
In your position I would create a group for all users that I want to have access to the shared directory
assign those users to the new group
change ownership of the shared files to the group
set permissions to allow the owner and group read/write access.
chmod -R 660 changes the permissions of [foldername] and all its subdirectories to read/write for owner and group. This is good unless you want to run programs out of the folder then use chmod -R 770 [foldername]
*remember that any for samba user you want to add to the group you need to use the unix(linux) user name not the Windows one(these could be the same).
You can add a new user to a group with 'useradd'
you can change the owner of the files with 'chown'
running '[command] --help' in the terminal(console) should tell you how to use that command but if you need more info you can type 'man [command]' into the terminal and it should give you detailed info on how to use it.
From my experience be careful when running commands as root, small typos can cause big headaches.
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
ok i've done what you said and i've lost all access to the folder from win7 machine
but if i chmod 777 i get it back
if i chmod 770 i lose it again
so this i'm getting in only via "world" not user or group right?
hmm
also, if i create or modify unix users do i need to add them to samba?
so this i'm getting in only via "world" not user or group right?
yes
Quote:
also, if i create or modify unix users do i need to add them to samba?
Only for each user you want to connect via samba to your server.
You may be able to make all the windows users share the same unix user, but i'm not sure. I just make all the computers connect as the same samba user.
I use the Samba Server Configuration Tool to manage my samba users, but I prefer to edit smb.conf manually to configure my server and shared folders. If you have the tool or get it, just go to Prefrences->Samba Users there you can add/remove samba users and assign them to unix accounts.
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
i dont have GUI. i'm using ubuntu server. i can use webmin but for some reason samba doesn't show up under servers in webmin
i'm trying to use the terminal anyway. feel like i'll learn more that way
I found the file that samba uses to link unix users to samba users. Its smbusers and should be in the same location as your smb.conf. The syntax is strait forward:
# Unix_name = SMB_name1 SMB_name2 ...
The assignment of the samba user might be wrong and cause the loss of access after chmod 770.
Quote:
Originally Posted by skinney
i dont have GUI. i'm using ubuntu server. i can use webmin but for some reason samba doesn't show up under servers in webmin
i'm trying to use the terminal anyway. feel like i'll learn more that way
No GUI is why I made my file server a linux box. I did install a GUI for maintenance purposes but it ran default to run level 3. On fedora this does not load X and boots to a console. After the initial set up I rarely ran a GUI on it.
I know nothing about webmin and you should search or start a new thread if you have problems with it
One small detail to note is that /etc/samba/smbusers file did not exist on my system (feisty fawn). However, just creating the file is the designated directory was all I had to do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.