I have a f9 system at home and it is used by me, wife and kids.
Sometimes we want to share files docs, pictures and stuff. Here are my plans,
1. mkdir /fileshare
2. create "share" group
3. add all users this group
4. chmod -R ug+rwx /fileshare
5. chown -R root:share /fileshare
6. for each user, rm -rf /home/<user>/Public
7. for each user, ln -s /fileshare /home/<user>/Public
Whatever they copy to their Public directory, it will be visible by all.
Will this work? Is there a better idea?
Thanks, Steve
Steve Repo wrote:
I have a f9 system at home and it is used by me, wife and kids.
Sometimes we want to share files docs, pictures and stuff. Here are my plans,
mkdir /fileshare
create "share" group
add all users this group
chmod -R ug+rwx /fileshare
chown -R root:share /fileshare
for each user, rm -rf /home/<user>/Public
for each user, ln -s /fileshare /home/<user>/Public
Whatever they copy to their Public directory, it will be visible by all.
Will this work? Is there a better idea?
No need to make a group called share. Use the idea of /tmp as your guide. Just make sure that you set the sticky bit for the directory you create....
STICKY DIRECTORIES When the sticky bit is set on a directory, files in that directory may be unlinked or renamed only by root or their owner. Without the sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on directories, such as /tmp, that are world-writable.
Steve Repo wrote:
I have a f9 system at home and it is used by me, wife and kids.
Sometimes we want to share files docs, pictures and stuff. Here are my plans,
mkdir /fileshare
create "share" group
add all users this group
chmod -R ug+rwx /fileshare
chown -R root:share /fileshare
for each user, rm -rf /home/<user>/Public
for each user, ln -s /fileshare /home/<user>/Public
Whatever they copy to their Public directory, it will be visible by all.
Will this work? Is there a better idea?
In addition to your chmod -R ug+rwx /fileshare command, how about you make the group permissions "stick" to newly created files and directories inside /fileshare?
chmod g+s /fileshare
Note that all users in the share group can then create/modify/delete all files and directories in /fileshare
Note that you are allowing the users to delete the directory /fileshare/ itself as well...
-Jeroen
On Mon, Sep 29, 2008 at 2:54 PM, Jeroen van Meeuwen kanarip@kanarip.com wrote:
Steve Repo wrote:
I have a f9 system at home and it is used by me, wife and kids.
Sometimes we want to share files docs, pictures and stuff. Here are my plans,
mkdir /fileshare
create "share" group
add all users this group
chmod -R ug+rwx /fileshare
chown -R root:share /fileshare
for each user, rm -rf /home/<user>/Public
for each user, ln -s /fileshare /home/<user>/Public
Whatever they copy to their Public directory, it will be visible by all.
Will this work? Is there a better idea?
In addition to your chmod -R ug+rwx /fileshare command, how about you make the group permissions "stick" to newly created files and directories inside /fileshare?
chmod g+s /fileshare
Note that all users in the share group can then create/modify/delete all files and directories in /fileshare
Note that you are allowing the users to delete the directory /fileshare/ itself as well...
Thanks for all the tips! How do I prevent someone from deleting /fileshare?
Steve
Steve Repo wrote:
On Mon, Sep 29, 2008 at 2:54 PM, Jeroen van Meeuwen kanarip@kanarip.com wrote:
Steve Repo wrote:
I have a f9 system at home and it is used by me, wife and kids.
Sometimes we want to share files docs, pictures and stuff. Here are my plans,
mkdir /fileshare
create "share" group
add all users this group
chmod -R ug+rwx /fileshare
chown -R root:share /fileshare
for each user, rm -rf /home/<user>/Public
for each user, ln -s /fileshare /home/<user>/Public
Whatever they copy to their Public directory, it will be visible by all.
Will this work? Is there a better idea?
In addition to your chmod -R ug+rwx /fileshare command, how about you make the group permissions "stick" to newly created files and directories inside /fileshare?
chmod g+s /fileshare
Note that all users in the share group can then create/modify/delete all files and directories in /fileshare
Note that you are allowing the users to delete the directory /fileshare/ itself as well...
Thanks for all the tips! How do I prevent someone from deleting /fileshare?
The same way you can't delete /tmp.
The parent directory doesn't have "w" permission for group or other.
On Mon, Sep 29, 2008 at 2:34 AM, Steve Repo scmuser@gmail.com wrote:
Thanks for all the tips! How do I prevent someone from deleting /fileshare?
Steve
You could try using ACLs. Each user would have specific permissions. Each file and directory can have custom access. Do "man setfacl".
~af
Steve Repo wrote:
On Mon, Sep 29, 2008 at 2:54 PM, Jeroen van Meeuwen kanarip@kanarip.com wrote:
Steve Repo wrote:
I have a f9 system at home and it is used by me, wife and kids.
Sometimes we want to share files docs, pictures and stuff. Here are my plans,
mkdir /fileshare
create "share" group
add all users this group
chmod -R ug+rwx /fileshare
chown -R root:share /fileshare
for each user, rm -rf /home/<user>/Public
for each user, ln -s /fileshare /home/<user>/Public
Whatever they copy to their Public directory, it will be visible by all.
Will this work? Is there a better idea?
In addition to your chmod -R ug+rwx /fileshare command, how about you make the group permissions "stick" to newly created files and directories inside /fileshare?
chmod g+s /fileshare
Note that all users in the share group can then create/modify/delete all files and directories in /fileshare
Note that you are allowing the users to delete the directory /fileshare/ itself as well...
Thanks for all the tips! How do I prevent someone from deleting /fileshare?
I made a mistake, to delete /fileshare you need permissions on /, not /fileshare itself.
Kind regards,
Jeroen
On Mon, 2008-09-29 at 14:20 +0530, Steve Repo wrote:
create "share" group
For what it's worth, there's already a "users" group that seems the obvious one to pick for that sort of thing.