RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 |
Rexter
Member
2014-Jul-15 10:36 pm
all access to all user with chmodIf I have a folder where I want everyone to have full access to all files and folder inside can I just do:
sudo chmod -R 777 Folder |
|
|
Salty_Peaks
Anon
2014-Jul-15 10:56 pm
Hi Rexter,
If you're setting something world-writable, you're doing it wrong. Can you explain your intent and desired outcome? Explicitly, world writable is so bad... yeah it's bad. |
|
RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 |
Rexter
Member
2014-Jul-15 11:06 pm
It's simply a share folder on the local drive. I want all local users to have full access. |
|
|
Usually you would create a group (e.g. everyone ) and add all users to it.
Most likely you don't want to give access to the folder to all daemons running as special users in the background. |
|
|
to Rexter
said by Rexter:can I just do:
sudo chmod -R 777 Folder Yes. I'm not sure why people are giving hedged answers. I happen to have a directory where I have set 777 permissions. It's actually a directory that I share with samba, and those permissions allow any computer on the LAN to read/write files there. I trust the users of the LAN enough to not be worried about this. And what goes in that directory is not all that crucial if somebody deletes it. I'm not sure what Rexter plans to do with his folder, but that's his concern. |
|
shdesignsPowered By Infinite Improbabilty Drive Premium Member join:2000-12-01 Stone Mountain, GA (Software) pfSense ARRIS SB6121
|
There is a simpler method with samba. On the share set:
force user = username
Then all users that use that share will act as the same user. You just make sure the directory is a member of the appropriate group or owned by the forced user. |
|
ExodusYour Daddy Premium Member join:2001-11-26 Earth |
to Rexter
Short answer: Yes. Long answer: You should consider the environment you're in and what folder you set to 777.
If you're at home and the folder is something like /rexter, not /home or /usr or /opt or something like that, there's no real harm in it, assuming that you understand that anyone with access to the system can reach that folder.
If you're at work, you should consider adding everyone to a group and then giving the group ownership of the folder. You could sudo chown -R root:newgroupname Folder, then sudo chmod -R 770 Folder.
That's a more secure method, but if you care not about security, your original method is fine. Just keep in mind that it's a group file-dump where anything and everything can be modified from that folder. If that's fine for you, then go for it. There are places where that's fine for me, and then there are places where that's not. |
|
MaxoYour tax dollars at work. Premium Member join:2002-11-04 Tallahassee, FL |
to Rexter
Just because the directory and all of its contents are 777 does not mean that any new content will have the same permissions. For example. ~ mkdir foo
~ ls -la foo
total 52
drwxrwxr-x 2 baucumd baucumd 4096 Jul 16 07:44 .
drwx------ 164 baucumd baucumd 45056 Jul 16 07:44 ..
~ chmod 777 foo
~ ls -la foo
total 52
drwxrwxrwx 2 baucumd baucumd 4096 Jul 16 07:44 .
drwx------ 164 baucumd baucumd 45056 Jul 16 07:44 ..
~ cd foo
~/foo touch bar
~/foo ls -la
total 60
drwxrwxrwx 2 baucumd baucumd 4096 Jul 16 07:45 .
drwx------ 164 baucumd baucumd 45056 Jul 16 07:45 ..
-rw-rw-r-- 1 baucumd baucumd 0 Jul 16 07:45 bar
~/foo chmod 777 *
~/foo ls -l
total 8
-rwxrwxrwx 1 baucumd baucumd 0 Jul 16 07:45 bar
~/foo touch baz
~/foo ls -l
total 16
-rwxrwxrwx 1 baucumd baucumd 0 Jul 16 07:45 bar
-rw-rw-r-- 1 baucumd baucumd 0 Jul 16 07:45 baz
~/foo
You will want to read » superuser.com/questions/ ··· irectory for information on how to have child files inherit permissions from their directory. |
|
|
BranoI hate Vogons MVM join:2002-06-25 Burlington, ON (Software) OPNsense Ubiquiti UniFi UAP-AC-PRO Ubiquiti NanoBeam M5 16
1 edit |
Brano
MVM
2014-Jul-16 7:56 am
That depends on your umask settings.
Also for the world writable folders sometimes it's desirable that users can delete only their own files which can be accomplished by setting sticky bit for others chmod 1777 ...on most systems /tmp folders are setup this way.
As mentioned in above link, setting setgid on group will make it inherit permissions from parrentchmod 3777 ... setgid and sticky. |
|
|
to shdesigns
said by shdesigns:Then all users that use that share will act as the same user. I also share the same directory with NFS, which won't honor that samba setting. |
|