LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   No write permission on folder even though samba.conf says otherwise (http://www.linuxquestions.org/questions/linux-networking-3/no-write-permission-on-folder-even-though-samba-conf-says-otherwise-936274/)

gtrrockz84 03-24-2012 09:35 PM

No write permission on folder even though samba.conf says otherwise
 
Hi,
I created a folder and made it read only. Then i said write list = me. When i log into the ubuntu/samba server with my credentials i still see the folder as read only. i dont understand. i expect me to be able to write but every one inlcuding me is read only :(.

i make changes to samba files using swat.

Not sure why the write list is not working. Please help. Thanks

amenditman 03-24-2012 10:42 PM

I believe you are seeing a conflict between the linux native file permissions, which you set up as read only, and Samba.

If you change the file permissions, to allow you to read and write, then Samba will allow you to write.
The permissions are limited first by the linux native set up then samba can restrict or allow those permissions.

gtrrockz84 03-25-2012 09:01 AM

Thanks for your reply. So in effect samba permissions are meaningless? Because if I put rwx in linux no matter what setting I put in Samba its going to be rwx always? I'm just trying to understand. Also saying linux native you mean chmod right? Thanks a lot for your help!

amenditman 03-25-2012 11:06 PM

If you put rwx in Linux, that is the max that Samba could grant (you could use Samba to restrict it). But if you put r-- in Linux, Samba cannot grant anything more than that no matter what you set up in your config.

Yes, by Linux native file permissions I mean the umask and chmod settings.

gtrrockz84 03-26-2012 08:58 AM

Sweet. It worked perfectly. Thanks a lot for your help! So I think its best to give rwx to everyone in linux and then just restrict it using samba. Thanks :)

amenditman 03-27-2012 12:02 AM

The Unix security philosophy, which Linux follows, is to give the minimum permissions possible and have the user able to do the job.

As a blanket statement,
Quote:

So I think its best to give rwx to everyone in linux and then just restrict it using samba.
is asking for trouble and is poor security practice.

WizadNoNext 03-30-2012 12:01 PM

Samba permissions are on top of Linux permissions, but Linux permissions could limit Samba. Samba cannot limit Linux permissions, but setting read-only in Samba on folder with write permissions, would restrict permissions for Samba alone! Samba admin can write everywhere, where root can write, so even, if it do not have any write permissions, Samba admin still can write there, but in case of new files, they would with root owner, which for sure nobody likes.


All times are GMT -5. The time now is 07:46 AM.