Ask Your Question
0

/var error

asked 2014-10-22 08:09:59 -0600

SantoshHoropter gravatar image

updated 2014-10-22 08:31:55 -0600

mether gravatar image

I was doing php course and its home directory being /var/www, I changed the ownership to my username. Now I can't view my file partition after reboot... How can I rollback the changes. i have fedora live uSB if that can help...

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2014-10-22 19:48:19 -0600

updated 2014-10-24 19:12:02 -0600

To allow your normal user to work with files in /var/www, you should use a group, but leave the user ownership alone.

  1. groupadd wwwusers
  2. usermod -a -G wwwusers Santosh
  3. chown -R root:wwwusers /var/www

If you are using a live image, you generally don't expect any changes to be persistent across reboots. If you are going to use Fedora regularly instead of just previewing it, you should actually install Fedora.

edit flag offensive delete link more

Comments

Thank you very much...

SantoshHoropter gravatar imageSantoshHoropter ( 2014-10-22 21:12:43 -0600 )edit

I thought you are unable to enter even the OS?

rsc gravatar imagersc ( 2014-10-23 01:15:47 -0600 )edit

yeah.. here is no cure for that except reinstalling the OS... It is because now the file can't somehow mount the var directory. This here is one of those fatal errors

SantoshHoropter gravatar imageSantoshHoropter ( 2014-10-23 17:27:20 -0600 )edit

also I forgot to mention... there is this error popping up in my friend's account while it ran perfectly fine in mine... chown: invalid user: ‘wwwusers:root’

SantoshHoropter gravatar imageSantoshHoropter ( 2014-10-23 17:33:18 -0600 )edit

If you can't boot the OS, you did something more than change the ownership of /var/www. And I think your friend probably missed a step.

randomuser gravatar imagerandomuser ( 2014-10-23 18:41:01 -0600 )edit
0

answered 2014-10-22 08:14:18 -0600

rsc gravatar image

What did you do exactly? What do you mean by "file partition"? What do you mean by "home directory being /var/www"? Did you create a user that has a home directory being "/var/www"? If you could provide the commands that you run that would make things easier to revert/correct them rather by letting others guessing what you did ;-)

If you just need to change the ownership of "/var/www" back to defaults this could be done using "su -c 'chown -R root:root /var/www'" (without the "").

edit flag offensive delete link more

Comments

I am unable to enter the OS let alone access a terminal.

SantoshHoropter gravatar imageSantoshHoropter ( 2014-10-22 13:46:58 -0600 )edit

May you provide the commands that you run exactly, please? It's hard to guess what you maybe did so it's even harder to repair it blindly.

rsc gravatar imagersc ( 2014-10-22 14:56:01 -0600 )edit

chown -hR Santosh /var/www

SantoshHoropter gravatar imageSantoshHoropter ( 2014-10-22 18:23:27 -0600 )edit

I can not see how this command (alone) would make your system no longer bootable. It likely breaks the startup of the Apache webserver ("httpd") but not the whole system.

rsc gravatar imagersc ( 2014-10-24 14:17:26 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-22 08:09:59 -0600

Seen: 96 times

Last updated: Oct 24 '14