LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-12-2012, 12:58 PM   #1
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Rep: Reputation: Disabled
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?

Last edited by skinney; 10-12-2012 at 02:12 PM.
 
Old 10-12-2012, 04:13 PM   #2
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
See this thread on the fedora forums:
http://forums.fedoraforum.org/showthread.php?t=267377
It should apply to Ubuntu as well...
 
Old 10-12-2012, 06:58 PM   #3
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
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?

I'm not sure tha ubuntu has selinux

Last edited by skinney; 10-12-2012 at 07:02 PM.
 
Old 10-12-2012, 07:05 PM   #4
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
My manual edits to the samba.conf have been less involved. I don't run Microsoft at home...

Did you download the sample samba.conf file, and look at that?
 
Old 10-12-2012, 09:08 PM   #5
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-13-2012, 01:48 AM   #6
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
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)

i'll do a post about this command

Last edited by skinney; 10-13-2012 at 10:33 AM.
 
Old 10-14-2012, 03:32 AM   #7
croog
LQ Newbie
 
Registered: Feb 2006
Distribution: fedora-17-x86_64 Xfce
Posts: 29

Rep: Reputation: 1
Quote:
Originally Posted by skinney View Post
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.

as root run the commands

groupadd [group]
usermod -a -G [group] [user]
chgrp -R [group] [foldername]
chmod -R 660 [foldername]

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'

As for chmod permissions take a look at this chart it should make them quite clear http://www.draac.com/chmodchart.html

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.

Good luck

Last edited by croog; 10-14-2012 at 03:38 AM.
 
1 members found this post helpful.
Old 10-14-2012, 08:17 PM   #8
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
I will do this!
this answers many questions
thank you!
 
Old 10-14-2012, 09:19 PM   #9
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
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?
 
Old 10-16-2012, 11:35 AM   #10
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
i have reinstalled ubuntu server on my 8 gig flashdrive and permissions seem to be working better
 
Old 10-16-2012, 07:41 PM   #11
croog
LQ Newbie
 
Registered: Feb 2006
Distribution: fedora-17-x86_64 Xfce
Posts: 29

Rep: Reputation: 1
Quote:
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.
 
Old 10-16-2012, 11:10 PM   #12
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-17-2012, 07:03 PM   #13
croog
LQ Newbie
 
Registered: Feb 2006
Distribution: fedora-17-x86_64 Xfce
Posts: 29

Rep: Reputation: 1
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 View Post
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
 
Old 10-17-2012, 07:57 PM   #14
skinney
Member
 
Registered: Oct 2012
Location: oakland,ca
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86

Original Poster
Rep: Reputation: Disabled
my samba folder doesn't have that file
maybe i should create it?
/etc/samba/ has 3 files... dhcp.conf, gdbcommands and smb.conf

I'm not real worried about webmin
 
Old 10-17-2012, 09:02 PM   #15
croog
LQ Newbie
 
Registered: Feb 2006
Distribution: fedora-17-x86_64 Xfce
Posts: 29

Rep: Reputation: 1
A comment at http://www.howtogeek.com/howto/ubunt...ser-on-ubuntu/ says
Quote:
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.
 
  


Reply



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
Need Perl script to get files from Linux Samba share folder to Windows folder kowsi Programming 1 10-10-2012 05:57 PM
how to share a folder in samba with no need of user password with write permission golden_boy615 Linux - Newbie 3 06-15-2011 08:09 PM
Best software/setup to share/access/stream files between Nix and Win7 iball8888 Linux - Software 2 12-14-2010 11:03 PM
share folder (read/write) Winanjaya Linux - Newbie 3 10-06-2008 07:24 AM
Why can I not write to a SAMBA share when read/write is enabled? eric m Linux - General 4 08-21-2006 09:22 PM

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

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