LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-19-2017, 09:05 PM   #1
jayr2112
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Rep: Reputation: Disabled
Post Can access samba share but cant write


I have setup samba shares on our RHEL Server and can access the share from my windows machine. However i cannot copy or create anything on the shared folder. Im able to access the shared drive from windows machine using the "opm" user which is a local account on my Linux server.

Here is my Samba conf. file

[opmtx]
writeable = yes
path = /Qadapps/opmetrix/Live
write list = opm
force user = opm
valid users = opm
browsable = yes
public = yes

And my directory permission

[root@server Qadapps]# ls -l opmetrix
total 0
drwxr-xr-x. 4 opm root 32 Dec 13 08:41 Live

[root@server opmetrix]# ls -l Live
total 0
drwxr-xr-x. 2 opm root 64 Dec 20 15:28 Export

Directory= /Qadapps/opmetrix/Live/Export
 
Old 12-20-2017, 09:50 AM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Hey jayr2112,

I'm wondering if this may have something to do with the fact that the group owner of those directories is the "root" group ... Although your opm user is owner and has write permission, the group owner has only read and execute ... and the group in question is root.

Any reason for the group owner being root ?

Purely as a troubleshooting exercise to generate possible solution ideas, you might try:

- changing the group owner of the directory tree to opm:

Code:
# chown -R opm:opm /Qadapps/opmetrix
... and try samba write access after restarting the smbd and nmbd services ....

- if that doesn't yield any results, try changing the group permissions to add write:

Code:
# chmod -R 0775 /Qadapps/opmetrix

... If either of those modifications yields a positive result - it will probably point you in the right direction.

Cheers.
 
Old 12-20-2017, 08:20 PM   #3
jayr2112
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi Rickkk,

Appreciate your advice.

I have done what you ask, and unfortunately i still cant write on the share.


drwxrwx---. 3 opm opm 17 Dec 20 15:55 opmetrix

drwxrwxr-x. 4 opm opm 32 Dec 13 08:41 Live

drwxrwxrwx. 2 opm opm 64 Dec 20 15:28 Export

created samba password using below command and i use it when accessing the share. Manage to go through except when to write on the share

smbpasswd -a opm

Permission seems to be ok but i dont know why i still cant write.

Last edited by jayr2112; 12-20-2017 at 08:23 PM.
 
Old 12-21-2017, 10:50 AM   #4
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Hi again jayr2112,

I see one detail that might still be preventing you from writing to the share.

The permissions on the "optmetrix" level seem to be 750 ... You need to at least have "Execute" permission for "everybody" on a directory to be able to list its contents. Although I am unsure whether this is what's causing the problem, if it were me, I would apply 775 permissions to that entire tree or at least 751.

Also, I don't remember seeing the linux permissions for the /Qadapps level directory ... perhaps make sure these are also appropriate.

Other than that, your samba setup looks good ... so I'm not sure what else it could be other than your linux permissions ... I assume you are able to write to the directory as user "opm" while logged on to the linux machine directly ?

Any ideas from other members ?

Cheers.

Last edited by Rickkkk; 12-21-2017 at 10:53 AM.
 
Old 12-21-2017, 05:06 PM   #5
jayr2112
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Have changed the permission for both opmetrix and Qadapps to 775

drwxrwxr-x. 12 opm opm 4096 Dec 12 10:52 Qadapps

drwxrwxr-x. 3 opm opm 17 Dec 20 15:55 opmetrix

Still the same issue

This is my global conf

[global]
log file = /var/log/samba/log.%m
cups options = raw
load printers = yes
server string = Samba Server Version %v
workgroup = MYGROUP
os level = 20
encrypt passwords = yes
security = user
passdb backend = tdbsam
max log size = 50

One thing im trying to understand is this. Does the samba password have to be the same as the Linux user or is it totally different and not related.
 
Old 12-21-2017, 05:29 PM   #6
jayr2112
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi Rickkk,

Finally manage to get it working. I wasnt looking at the selinux security context as it was enforcing. Changed it to Permissive and it worked.

Thanks for the help.

Much appreciated
 
  


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
Write access to samba share problem. eddyml Red Hat 3 02-16-2015 07:17 AM
Unable to enable write access to Samba share stonehurstX11 Linux - Server 1 08-14-2010 07:20 PM
no write access to subfolders of samba share roozbeh Linux - Server 8 12-08-2009 07:35 PM
Write Only access to samba share ? nathan2225 Linux - Software 0 11-08-2007 02:21 AM
mounted NT Samba share write access problems dm215 Linux - Software 1 01-08-2007 11:40 AM

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

All times are GMT -5. The time now is 06:30 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
Open Source Consulting | Domain Registration