LinHES Forums
http://forums.linhes.org/

samba permissions problem
http://forums.linhes.org/viewtopic.php?f=5&t=18895
Page 1 of 1

Author:  rkshack [ Sat Aug 30, 2008 9:44 am ]
Post subject:  samba permissions problem

When I try to write to /myth from my windows pc via samba I get a permissions error. I think the permission is set to 755 but I am not 100%. I looked at the samba info under webmin and thats where I saw the 755.

Rkshack

Author:  graysky [ Sat Aug 30, 2008 9:51 am ]
Post subject:  Re: samba permissions problem

rkshack wrote:
When I try to write to /myth from my windows pc via samba I get a permissions error. I think the permission is set to 755 but I am not 100%. I looked at the samba info under webmin and thats where I saw the 755.

Rkshack


What user account are you connecting up with? If it's mythtv you should sufficient privs to do whatever. Did you mess with the conf file?

Author:  rkshack [ Sat Aug 30, 2008 10:28 am ]
Post subject:  Re: samba permissions problem

graysky wrote:
rkshack wrote:
When I try to write to /myth from my windows pc via samba I get a permissions error. I think the permission is set to 755 but I am not 100%. I looked at the samba info under webmin and thats where I saw the 755.

Rkshack


What user account are you connecting up with? If it's mythtv you should sufficient privs to do whatever. Did you mess with the conf file?


I have not messed with the conf file. I am logging in with mythtv/mythtv.

Author:  graysky [ Sat Aug 30, 2008 11:00 am ]
Post subject: 

Ah! Are you trying to write to /home/mythtv ? If so you'll need to edit the /etc/samba/smb.conf and change the read only = yes line to read only = no.

Code:
; By default, the home directories are exported read only. Change next
;       parameter to "no" if you want to be able to write to them.
   read only = no


I just tested read/write/delete on /myth on an out-of-the-box fresh install of R5.5 and indeed all three work. That said, there are some directories under /myth that the user mythtv cannot write to and this is true if you try it from a shell. As well, you'll be unable to make a new file or dir under /myth due to the file permissions on myth which only allow the mythtv user to read and execute files.

Are you familiar with UNIX file permissions? The following is not meant to be scarcatsic, just informative (it's hard to tell the level of UNIX/LINUX knowledge folks have):

If you do a
Code:
$ ls -lh /


You'll get a list of all the dirs in the system. Notice the stuff in front of /myth:

Code:
drwxr-xr-x  19 root   root   4.0K Aug 30 08:57 myth


The "d" means directory
root:root means the owner is root and the owner's group is root

rwxr-xr-x assigns the permissions for: owner | owner group | everyone else

|rwx|r-x|r-x|

That means the owner (root) can read, write, and execute
the owner's group and read and execute, but not write
and everyone else can also read and execute

My point is, if you're trying to make a new file or dir under /myth logged in (via samba or otherwise) as mythtv, you'll get denied.

You can make the dir under /myth as root, the change owners to mythtv (see the chown command, syntax is, chown mythtv:mythtv /myth/dirname)

You can look up the man pages on google or from the shell on the following for more:

chown
chmod

I'd also recommend googling for the terms "basic linux file permissions" or something similar.

Again, the above wasn't meant to be sarcastic, just informative.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/