Fedora / Samba - n00b - how to give these two users write access to files the other creates in the "management" share?

If they originate the files they can read / write - but if they try to edit others docs they can only read.

What to do?


[ed@server1 users folders]$ su root
Password:
[root@server1 users folders]# mkdir management
[root@server1 users folders]# ls
admin-private  admin-public  management  test  users-personal
[root@server1 users folders]# chmod 777 management
[root@server1 users folders]# ls
admin-private  admin-public  management  test  users-personal
[root@server1 users folders]# service smb restart
Shutting down SMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
[root@server1 users folders]# cd management
[root@server1 management]# ls
clarewil.txt  tommyd.txt
[root@server1 management]# ls la
ls: cannot access la: No such file or directory
[root@server1 management]# ls -la
total 8
drwxrwxrwx  2 root     root   4096 Apr  4 15:34 .
drwxrwxrwx. 7 root     root   4096 Apr  4 15:31 ..
-rwxr--r--  1 clarewil public    0 Apr  4 15:33 clarewil.txt
-rwxr--r--  1 tommyd   public    0 Apr  4 15:34 tommyd.txt
[root@server1 management]#



fcekAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

upanwarCommented:
You can add those two user in a group, in which other users belong and give your share to write permission to the group and add this line in your smb.conf for that perticular share.

create mask = 0775

It will create files with permission 775 and your users and users belongs to that group would be able to edit that files.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fcekAuthor Commented:

smb.conf

Before:

[management]
      path = /users folders/management
      valid users = clarewil, ed, tommyd
      read only = No
      browseable = No

After:

[management]
      path = /users folders/management
      valid users = clarewil, ed, tommyd
      read only = No
      browseable = No
      create mask = 0775


============================ result is worse! ====================

[ed@server1 management]$ touch ed.txt
[ed@server1 management]$ ls
clarewil.txt  ed.txt  tommyd.txt
[ed@server1 management]$ ls -la
total 8
drwxrwxrwx  2 root     root   4096 Apr  4 22:57 .
drwxrwxrwx. 7 root     root   4096 Apr  4 15:31 ..
-rwxr--r--  1 clarewil public    0 Apr  4 15:33 clarewil.txt
-rw-r--r--  1 ed       public    0 Apr  4 22:57 ed.txt
-rwxr--r--  1 tommyd   public    0 Apr  4 15:34 tommyd.txt
[ed@server1 management]$

===================================================

Do I create a "group" and add the three people to it?
FYI - I already have a group called "public" and everyone is a member of it.
0
upanwarCommented:
If a group named public is available and do you want that all users belongs to public group can modify that files or only the three user can modify.

If for three users only then you need to create a different group otherwise not.

You are asking asking here about samba and creating files locally. The suggestion which I have given will work for samba only. If you need a solution for the files which you creates locally then we have to go for different solution.

Please clarify whether you need the solution for samba only or your requirement is different.
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

upanwarCommented:
For samba share the above solution will work and if you want that locally when these three user creates a file it should have permission of 775 then you need to change the umask for these three users.

go to in each user's home directory and append/modify following line in that user's .bashrc file.

# vi .bashrc

umask 002

Now every created file by those three users will have permission of 775.
0
fcekAuthor Commented:

Hi upanwar.  To explain this better.

Share "Public"
Group "public" - Everyone is a member of it.  It works fine.

New share: Management.
I want three people to have full access but everyone else not to be able to see it.

Do I have to create a group called "management" and put @management in samba so all have equal rights to read/write/execute?


0
upanwarCommented:
yes thats correct and your three users should belongs to new group.
0
fcekAuthor Commented:


Sounds logical and doesnt sound too difficult.  Will give it a try tonight in the early hours after my day work is done.


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.