Lubuntu File Server Permissions
Hi, I'm brand new to Linux and have spent the last two days fumbling through it.
I'm at a loss on this issue though and have searched extensively but not found a clear solution. I am running Lubuntu 12.04 on a HP Microserver N40L. I have set up a RAID5 array (using mdadm)to store all my media. I have managed to create a Samba share of the raid (/mnt/mdo) and can detect and browse it on my Macbook Pro (running Lion 10.7.4). How It Works At The Moment: --On the Lubuntu box-- *Can create folders and write data to them at the root of the Raid. *Can only read folders/files created or copied to the share by the Mac. --On my Macbook-- *Can create files and folders and write to them at the root of the Raid. *Can only read folders/files created by the Lubuntu box. How I Would Like It To Work --On the Lubuntu Box-- *Can read and write to folders and files and all sub-directories no matter who the owner is. --On my Macbook-- *Can read and write to folders and files and all sub-directories no matter who the owner is. --In General-- *The same permissions as above for Windows users (read/write all) as I will be putting this microserver in a house with three windows PCs and a Mac. *In theory I'd like to be able to take this Lubuntu box and occasionally connect it to the gigabit network at work - could users connect to it with the same desired permissions as described above? At the moment I have to manually set permissions on a new folder in Lubuntu so that the Mac can read/write - but I need this to be automatic/default. On the Mac there is no way to edit folder permissions of folders that I place on the Raid. I am using Samba Server Configuration on Lubuntu. Essentially I want this to work like a big file server on the network that anyone can connect to and read/write - even guests who bring over their computers and plug into the ethernet. Thank you |
Hello and welcome to LinuxQuestions,
How are your current Samba permissions set up? And how are the permissions on the file system level? Keep in mind: 1. Linux system permissions take precedence over Samba permissions 2. The filesystem permission cannot be take priority over Samba permission Compare your current permissions taking into account the two rules above and check if you are complying with them. If possible post your Samba comfiguration file. Looking forward to your participation in the forums. Have fun with Linux. Kind regards, Eric |
Thanks for the swift response EricTRA.
1. I have used Webmin to check Linux permissions on the Raid [/mnt/md0]: user: read/write/list - checked group: read/write/list - checked other: read/write/list - checked sticky: only owners can delete files - unchecked. octal: 0777 ownership user: root ownership group: root setgid: files inherit group - unchecked. 2. Samba Server Configuration /mnt/md0: permissions read/write writable - checked visible - checked access - allow access to everyone - checked. 3. Webmin to check the Samba share Under security it says read/write to everyone. 4. PCManFM to check mnt/md0 permissions: owner: root group: root access control owner: read and write access control group: read and write access control other: read and write Here is my samba config file (the INDIESTOR entry is a piece of software I've not yet fully configured yet so I've ignored that): PHP Code:
TO be honest I still can't understand what a group is or how it is used but I have a feeling it may be the cause of my problems? Thank you. |
UPDATE - NEARLY THERE:
After much more tinkering and deleting and creating the Samba share again I am now able to: --create a folder on the Raid from the Mac and read/write it on Lubuntu. --create a folder on the Raid from Lubuntu and read and delete it on Mac, but not write to it. Unfortunately I've made that rookie error of not remembering what I did to get to this point but I'm here now. I have two folders on the Raid - one called "lubuntu" which was created on the Lubuntu machine and one called "mac" created using the Mac. Here are the default permissions. --Permissions for "lubuntu": owner: read and write group: read and write other: read only --permissions for "mac": owner: read and write group: read and write other: read and write I cannot figure out why the 'other' permissions on the lubuntu folder default to read-only. Once again - here is my new samba config file: Code:
#GLOBAL OPTIONS |
SOLVED
For anyone else with this problem - the trick is to perform chmod -R 777 /mnt/md0 in terminal - this resets the permissions recursively (replace /mnt/md0 with your required directory). This sets permissions to 'none' for owner, group, and other on folders created by the Lubuntu box. The only thing to remember is that you have to create folders via the samba share and not directly in the directory ie. create folders in smb://localhost/mdnt/md0 and not just in /mnt/md0. Hope that helps someone else! |
I implemented kind of the same system differently. I added my user to the samba group. The samba shared folders have rwx permissions for the group and guid bit is set. The result: I have rwx access to the shared folder since (I'm in the samba group) and whenever I create a new folder the owner is me and the group is samba (since guid is set on the folder). Works fine...
So, in other words... Try fixing it with group sharing and using the guid bit. Don't be reckless with the file persmissions by giving rwx to 'other'. |
Hi,
Sorry to come back this late but I'm glad to see that you got your problem solved. Kind regards, Eric |
All times are GMT -5. The time now is 04:21 AM. |