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 09-07-2013, 05:20 PM   #1
CaptainHaZ
LQ Newbie
 
Registered: Sep 2013
Posts: 4

Rep: Reputation: Disabled
Samba write permissions for an idiot


Evening all.

I have recently dipped my toe into the water of the vast ocean that is Linux. I've installed ArchLinux on a pogoplug and am running some samba shares from it. I am really struggling to get my head around all the different permissions though.

Currently, when I use the root login credentials, I can read the files in the share folders from multiple devices but i am unable to edit or add new files. I've been googling for hours and I just can't figure it out.

it might be useful so I've pasted the contents of my smb.conf below. Can anybody offer any assistance?

[global]
create mode = 777
server string = ALARM
default = media
public = yes
path = /media/Elements-2
security = user
max log size = 50
auto services = global
workgroup = WORKGROUP
load printers = no
log file = /var/log/samba/%m.log
directory mode = 777
os level = 20
read only = no
wins support = true
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = yes
read only = no
public = yes

[public]
path = /media
public = yes
read only = no
printable = no

[media]
path = /media
public = yes
read only = no
printable = no
 
Old 09-07-2013, 08:00 PM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,501

Rep: Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383
Welcome to LQ!

Users new to Samba often do not understand the need to add user names and passwords to the Samba backend password database. Have you added users using 'smbpasswd'? You can check if you run as root 'pdbedit -L'.
http://www.samba.org/samba/docs/usin...CHP-9-SECT-4.2
 
1 members found this post helpful.
Old 09-08-2013, 02:52 AM   #3
CaptainHaZ
LQ Newbie
 
Registered: Sep 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for the response allend

I have got users assigned to the backend. Running 'pdbedit -L' returns:

becky:1001:
smee:1002:
root:0:xxxx

I did have the initial presumption that, considering I was logging in as one of these users, i'd be able to edit, write and delete files in the shared folders but, alas, no.
 
Old 09-08-2013, 08:08 AM   #4
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,501

Rep: Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383
Looking more closely at your smb.conf, you have two share definitions with the same path, which is a confusing redundancy.
Code:
[public]
path = /media
public = yes
read only = no
printable = no

[media]
path = /media
public = yes
read only = no
printable = no
This path is normally reserved for mounting removable media.

Try:
1. Creating a directory /exports on ALARM (as root do 'mkdir /exports')

2. Change your smb.conf to this.
Code:
[global]
   server string = ALARM
   workgroup = WORKGROUP
   security = user
   load printers = no
   log file = /var/log/samba/%m.log
   max log size = 50
#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[ALARMshare]
   comment = Shared directory on ALARM
   path = /exports
   read only = no
   public = yes
3. Stop and restart Samba on ALARM.

You should now be able to see a share called 'ALARMshare' on your device.
 
1 members found this post helpful.
Old 09-08-2013, 08:56 AM   #5
CaptainHaZ
LQ Newbie
 
Registered: Sep 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Instructions followed. I now have two shares showing in the device. When I access /exports from my Win7 machine I can edit and create new files.

This leads me to suspect I have made an error previously. As you may have guess, the reason I was sharing /media/ is because I have two mounted USB drives within that directory. I have a feeling that I have mounted them as Read Only, hence at least part of my troubles. Is there a way to mount them with a specific permission set?
 
Old 09-08-2013, 09:24 AM   #6
CaptainHaZ
LQ Newbie
 
Registered: Sep 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Ok, I think I firgured it out. I installed ntfs-3g and mounted using that. Not root has rw permissions.

A step in the right direction. I should be able to figure out how to allow my plex access now. Thanks for your help allend
 
  


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
Samba write permissions Zafoid Linux - Newbie 6 10-18-2008 05:52 AM
Samba: Write and read permissions atheist Linux - Networking 1 05-04-2008 08:43 AM
no write permissions on samba share lrt Linux - Server 5 04-06-2008 07:39 AM
Samba Write Permissions Cottsay Linux - Software 2 05-13-2007 12:49 PM
Samba write permissions mrsolo Linux - General 2 08-24-2003 11:17 AM


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