Terve!
I have tried to setup a NAS for me, but I have struggled a lot so far. Now I am stuck with the permissions.
The steps I have taken:
-install ubuntu gnome on a USB stick
-setup 2 WD red in a BTRFs RAID 1 (with that installed BTRFS tools)
-enabled the share in the properties of the RAID (with the "host" user, installed the two needed packages)
-created an other user "shadow-r", added him to the secondary group "host"
-created a folder in the RAID volume that is acessable as "shadow-r" but not as "host"
Now, when I try to login from a Windows machine using "shadow-r" and the password 123456789, it brings up another window for signing in. The problem is that the "sign in as guest" is selected and I cannot change anything.
I will try to give you some pictures tomorrow, should this be desired. (errors or properties of folders)
@Eden this is the topic I have asked
Hope its not too weird to understand.
Thanks in advance for any help.
Sayonara!
[I already started writing this before you post, its likely all you need to do is have the correct samba configuration in which case the first part of this will be more helpful for you]
Probably the easiest way, since your talking about ftp and ssh as well is to manage the users on the system its sefl.
You can add all the users you need then make sure they are in the groups you need and that the folders have the correct group permissions that they need access to.
With samba you can configure it to allow groups to have access to areas. Here is the samba manual on users and security that should be helpful with that.
I'm not overly familiar with samba configuration so the best thing to do would be to look though that documentation.
On purely the Linux system side permissions are relatively straight forward.
You can add users with useradd
You can create groups with groupadd
So you might create some users and a group called fileshare
groupadd fileshare
useradd bob -m -G fileshare -p give_the_user_a_password
useradd alice -m -G fileshare -p give_the_user_a_password
-m creates a home directory for the user, and -G fileshare as it suggests adds the group fileshare to the users groups, and -p sets a password
You can see the groups that a user belongs to using id bob
so a user now has a login and belongs to a group that you can use for somthing. Say you want to have a folder thats shared between users like '/groupdata'
you create the folder, then you need to set its owner and permissions
to set an owner you can use chown
chown /groupdata :fileshare
chown changes the user and the group separated by a :
in the format user:group
if you leave one out it will leave that alone, so :fileshare
only changes the group of the files.
you might want to check the group permissions on the folder as well
ls -ls /groupdata
This will show the permissions for just the folder (-d does that)
to change permissions for the group, say to allow anyone in the group read write and execute access you would use the following
chmod g+wrx /groupdata
This would allow anyone remoteing into the server at least as a normal linux user to have proper access to a shared folder.