0

I'm working on a PHP website at the moment and I'm doing a LOT of writing to files and directories. Whenever these files are made, they're automatically owned by Daemon and I have to go into Terminal and execute sudo chown varosion /opt/lampp/htdocs/apps/<folder> in order to edit or delete these files. Is there anyway to take full ownership of the entire lampp folder and all future changes made to it? If that's not possible, is there anyway to change PHPs default ownership?

EDIT: I just found the option "Change Permissions For Enclosed Files", I'm not sure if this has solved my problem but it sounds like it.

  • 4
    See the manual for chown. The -R options traverses subdirectories. And gui style: properties, change permissions for enclosed files – Rinzwind May 21 '14 at 12:26
3

Try chmod -R xxx <files> where xxx stands for your desired permissions for owner, group, and the rest of users.

The -R flag makes the result of the command to be recursive into the subfolders.

The chown command changes the owner of the files, the chmod fits better if you only want to change permissions.

| improve this answer | |
  • Person in the comments beat you to it, I wish I could give the point to him. – Interprep May 21 '14 at 12:30
  • That's another solution, his workaround is faster as you already were trying to use chown. You could also give it a try to chmod, you're not going to lose more than a few minutes testing, and I think it helps keep things tidy :-) – versvs May 21 '14 at 12:33

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.