PDA

View Full Version : Chown file



p.leijstra
04-16-2009, 10:01 AM
Hi,

I'm new with Directadmin and have a problem. In order to change a file i pressed the reset owner button, so that the file owner was changed from Apache to user. Now i want to make Apache the owner again, how can i do that?

Thanks in advance

scsi
04-16-2009, 10:59 AM
Use ssh....

p.leijstra
04-16-2009, 11:28 AM
What is that and where can i find it?

Thanks in advance!

Internet54
04-16-2009, 07:22 PM
http://www.webhostgear.com/35.html

nobaloney
04-17-2009, 01:47 PM
Note that you can only do this if it's your server, and if you can shell in as root. If you can't, because it's not your server, then have your hosting company do it for you.

If it is your server, be very careful when you shell in as root. It's easier to delete your entire server through the root shell than it is to change ownership of a file from the control panel.

Jeff

floyd
04-17-2009, 04:25 PM
If all else fails you can chmod 666 the file so that apache can manage it again.

p.leijstra
04-18-2009, 02:56 AM
It is not my own server, so i think I can't do the things sugested. set the permisions to 666 seems to be the best idea, is that save? (so that nobody else can change it)

Thanks for the help!

floyd
04-18-2009, 04:56 AM
No its not safe but neither is having the file owned by apache. If the file is owned by apache then anybody else on the same web server can change the file.

nobaloney
04-18-2009, 02:36 PM
Actually, if they know how to do it, anyone else in the world can change the file if it's in a directory writable by apache, and either owned by apache, or chmod 666.

And lots of hackers know how to do it.

Jeff