New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
chown -R
So
chown -R user:group /home/site/public_html
will change the user and group for all sub folders and files?yes.
Worked like a charm. Thank you @putStrLn
To see all available options or flags for chown or chmod, review the man page or use the -h flag for help. Also, the option you're asking about is called"recursive".
@putStrLn @rajprakash Is there any way to do this so that it also applies to all new subfolders and files created going forward, even those created by other more privileged users?
A cronjob which must have same or higher privileges as user than the highest writing user.
Or, perhaps a sticky bit, depending on your operating system.
chown -R
@William thanks
U wot, m8?
Hmmm, so if I want all users to be able to modify all folders and files created within a specific folder within which I (plus background apps) am uploading, moving, and deleting files using different accounts (/some/super/hidden/buried/protected/folder/, for example), a sticky bit could work?
``
Well, yes, and no. If you chmod the folder 777 and set the umask appropriately for the files, there is no need.
Here's a simple explaination of using the sticky bit for different uses: http://unix.stackexchange.com/questions/79395/how-does-the-sticky-bit-work
So, it won't work for what I needed. I had googled before replying and what I was worried about was the part about "it makes a directory such that users can only delete files & directories within it that they are the owners of." As I described, I would want all non-privileged accounts to be able to modify/delete/write files created by multiple other non-privileged accounts below that directory.
I politely gave you the answer in my reply. Set the umask to 0000
afterbefore the file is written (or chmod it), and get on with life...until 3 minutes later when someone completely fucks over this entire "all in" ideology, at least. :
Ah, thanks. I didn't see the umask part on the first read .
I'm the only human user, so hopefully it'll be ok.
I'll let you live. For now.