-2

After I accidentally used the command chown /var/www/moodle, I couldn’t change the root directory to be /var/www/moodle, so that I can't install phpmyadmin.

I have looked some suggestions but not very useful, I guess the permission has now changed, the other problem is I don't remember in which root directory I have used the above command.

What I get right now:

chroot: cannot change root directory to /var/www/moodle: Operation not permitted

I am using linux for the first time.

peterh
  • 11,875
  • 18
  • 85
  • 108
user3395725
  • 31
  • 3
  • 10

1 Answers1

0

Your first command, the chown /var/www/moddle, was syntactically bad. You had to run some other, if you didn't get back an error message.

First, try a

chown root:root /var/www/moodle

...although a chroot command should be able to be called. Probably there is also another problem, what gets you if you call a

chroot /var/www/moodle

?

peterh
  • 11,875
  • 18
  • 85
  • 108
  • chown: changing ownership of `/var/www/moodle': Operation not permitted...is what i get after the command to every files in moodle – user3395725 May 05 '14 at 15:05
  • @user3395725 Only root can chown files. – peterh May 05 '14 at 15:06
  • I understand that but I used this chown -R root /var/www/moodle without knowing the outcome....so that is what resulted in the chown: changing ownership of `/var/www/moodle': Operation not permitted..to the entire file in moodle.... – user3395725 May 05 '14 at 15:14
  • @user3395725 If you got "Operation not permitted" for a chown, nothing is changed and moodle had to be work. If you are satisfied with an answer, you could accept and upvote that, which can be done even with held questions as this. The simplest solution were for your problem to reinstall moodle. – peterh May 05 '14 at 15:17
  • @user3395725 Thank you! Phpmyadmin is normally in /var/www/phpmyadmin, but nearly always is it out of /var/www/moodle, which is another web application. This moodle-problem shouldn't cause any problem with a phpmyadmin installation, the trouble sohuld be some other as well. – peterh May 05 '14 at 15:27
  • @user3395725 Such problems can be (and are) light fixed in linux, but they need a little experience. Really little - maybe after a year you will be able to solve such things on the plot. – peterh May 05 '14 at 15:28