0

So, is it possible to make multiple users the owner of a file when created? I mean, I know you can do chown -R apache:permissions /var/www/ (48:500) but that is only temporary because even if I decide to create a file after that, it will keep root as the owner, and apache as the group. (0:48) Well, this doesn't seem to work well for me with certain files.

How might I go about making root and apache the owner of a file/directory when created instead of a single owner.

I added apache and root to the group called "permissions", but even if I create a file, the permissions are switched over to apache (0:48).

Let me know if anything more needs to be clarified... I was told previously to follow this here

But that was not really a solution, all that did was just change the file permissions, as in 755/644, things like that.

0

You need to clarify your question. What exactly do you want to do, and what is preventing you from doing it?

It isn't possible to make multiple users the owners of a file. There can be only one owner. Groups were made exactly for that purpose.

chown -R apache:permissions /var/www/ changes the owner of the directory /var/www/ (and its subdirectories) to apache and the group to permissions.

What do you mean with "if I decide to create a file after that, it will keep root as the owner, and apache as the group"? When you create a file, the owner is the user who created it - so, if you are creating it as root, it will be owned by root. The group is apache likely because the directory has the setgid bit enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.