0

Argh help lol

I have ran a chown command (silly me) which I did not fully understand now when I connect via filezilla and try do anything write/delete files/directories I get

Error:  mkdir /var/www/html/mysite.co.uk/directory/dsf: failure
Command:    mkdir "/var/www/html/mysite.co.uk/directory/dsf"
Error:  mkdir /var/www/html/mysite.co.uk/directory/dsf: failure

Command:    rm "/var/www/html/mysite.co.uk/backend/downloads/TallyTest.apk"
Error:  rm /var/www/html/mysite.co.uk/backend/downloads/TallyTest.apk: failure

How can I undo this damage? :(

UPDATE Command history: http://tinypic.com/r/n1fl3b/6

4
  • Don't suppose you remember the syntax of the command that you ran?
    – EBGreen
    Feb 8, 2013 at 19:47
  • If you don't recall, try history in your shell to see if it's in your history (assuming that you have access of course...)
    – nerdwaller
    Feb 8, 2013 at 19:52
  • Ok thanks guys added a link to a screenshot of my command history.
    – Kal
    Feb 8, 2013 at 20:06
  • From the command history (which does not seem to be complete), I'm guessing the problem is NOT that you "chown"'ed a file its that you "chcon"ed it - this is a key difference as chcon works with SELinux for additional restrictions. (I am not an expert here, but at least this might help you with where to look ?). Try - at least temporarily - disabling selinux and seeing if your problem goes away - then at least you know the "domain" of the problem.
    – davidgo
    Feb 9, 2013 at 9:20

2 Answers 2

0

Well the best answer is to go to your backups and restore the damaged files.

You can use an older listing (if you have it) of the area and use that to manually return the area to the proper permissions.

Otherwise, I'll have to feel sorry for you.

1
  • This is the harsh way Unix teaches one not to fool around...
    – vonbrand
    Feb 9, 2013 at 3:32
0

The link to the history just shows an empty page and a suggestion to join. I won't, sorry.

You probably messed up the execute permissions, if so a chmod -R u+X . in your home should restore execute permissions for directories (i.e., use the directory to get at the objects it points to). Check the manual page for chmod, and correct permissions of the rest one by one (or cautiously use -R).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .