Questions tagged [chown]

The chown command is used on Unix-like systems to change the owner of a file.

26
votes
8answers
6k views

accidently ran “chown www-data:www-data / -R” as root

i just ran this a few seconds ago, i managed to do ctrl-c as soon as i realized what i started doing. so far in the only dir its started going through is /bin im afraid to do anything else, so far ...
52
votes
3answers
120k views

bad ownership or modes for chroot directory component

I created the user MY_USER. Set his home dir to /var/www/RESTRICTED_DIR, which is the path he should be restricted to. Then I edited sshd_config and set: Match user MY_USER ChrootDirectory /var/www/...
5
votes
4answers
2k views

Recovering from bad chown command

I was going to change the ownership of a directory to apache:apache, but I ended up running: chown -R apache:apache / Bad! Very bad! I knew what was going on when it started saying: chown: ...
26
votes
2answers
83k views

chown on a mounted NFS partition gives “Operation not permitted”

I have a remote partition that i have mounted locally using NFS. 'mount' gives 192.168.3.1:/mnt/storage-pools/ on /pools type nfs (rw,addr=192.168.3.1) On the server i have in exports: /mnt/...
3
votes
2answers
813 views

Recovering from a system-wide chown?

I have a Linux web server with multiple sites being hosted with CPanel. I was having trouble accessing a site, so I ran this command: chown -R root:root /home/evalreal/. While waiting for the command ...
3
votes
2answers
9k views

Limit sudo to only one directory and it's subdirectories by sudoers file

So I would like to limit Apache to only change permissions in a certain folder and all of it's sub-directories, so this is what I have in my sudoers file apache ALL= (ALL) NOPASSWD: /bin/chmod -R [g+...
2
votes
2answers
640 views

Determing the Execution Environment of Apache

I am having this error: [Mon Dec 05 10:22:23 2011] [warn] mod_rewrite: Running external rewrite maps without defining a RewriteLock is DANGEROUS! [Mon Dec 05 10:22:23 2011] [error] (13)Permission ...
2
votes
1answer
7k views

Can't modify or chown files on readynas nfs share

I have a readynas with nfs sharing. I have a bunch of files that I can't write to on the share. They're owned by nobody:nogroup and if I try to chown them I get chown: changing ownership of `...
0
votes
0answers
55 views

Changing User - Ubuntu 18.04 LTS

I installed mariadb, nginx, php7.2-fpm, ufw, fail2ban, zip and unzip as a root in the past. My site is WordPress. Now I have added an user with root privilages into my server. I won't use root user ...