Questions tagged [chown]

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

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

147 questions
0
votes
1 answer

Php can't write anything

Just moved my websites to my first vps (centos 7). So i'm very new to linux. Now I have a problem: php cant write anything. Can't make dirs, files, edit them. Php runs as "apache" Things I tried: Chmod all dirs and files to 777 Chown all dirs and…
0
votes
1 answer

I changed the owner of sudo. Is it possible to change it back to root?

Title says it all. I was copy-paste troubleshooting and I accidentally changed the owner of sudo from root to my username. No I can't sudo because: sudo: effective uid is not 0, is sudo installed setuid root? So I tried chown root: sudo but I was…
Ben Harold
  • 143
  • 1
  • 2
  • 9
0
votes
1 answer

Putty: pscp file transfer change permission

I am transferring my file using pscp with the command below: pscp target\app.war root@127.0.0.1:/jetty/webapps What would be the syntax to change the ownership of the app.war file ? In other words to perform chown -R jetty:jetty to the app.war…
0
votes
0 answers

chown: Operation not permitted for root on ext4 root-partition

After upgrading from Ubuntu v14.04 to v16.04 chown doesn't seem to work any longer on my server. I checked following: filesystem is RW user exists folder is not immutable all commands executed as root and for the heck i tried following (as…
NoLdman
  • 1
  • 2
0
votes
2 answers

Rsync to remote server and change file / directory ownerships

I am using Rsync to deploy to a remote server, which is working. However the file and directory ownership always replaces old files with root:root I need the ownership of all files and folders transferred to the destination folder on the remote…
Jack Wild
  • 101
  • 1
0
votes
0 answers

Accidentally ran chown -R / and now mail queue not being delivered

EDIT: BTW, everything else including all websites on the server are running fine except that mail queue in whm is not automatically being delivered. What directory would I need to change permissions on just to fix mail sending again? So last…
HekG
  • 11
  • 2
0
votes
2 answers

Give private key ownership to user without /home

so I am looking to set up ssh private/public keys between two servers, for use with sftp (and ultimately lftp using sftp - but one step at a time). I have created the private and public keys, and found that in order to use them, the private key must…
0
votes
1 answer

Prevent changing ownership of a file

I have file with 777 permission. How can I prevent changing ownership of that file by others? ie I need to prevent chown x:y myfile myfile is actually a log file written from web. it's ownership is www-data.
Harikrishnan
  • 1,057
  • 2
  • 14
  • 31
0
votes
1 answer

Reset ownership

An employee accidental recursively changed permissions from the root directory to apache. I reran it to root, we fixed MySQL, but SSH still doesn't work. What is the correct way to restore the ownership for sshd?
nicoX
  • 611
  • 9
  • 18
0
votes
0 answers

Files 404 unless owned by 0:0

When I upload files to my staging server (CentOS 6.5, Apache 2.2.26) - such as images or PDFs - via FTP, or by using a file upload script I created (using Laravel 4), they 404 even though they exist. However, any files that are pulled via git are…
Sacha
  • 101
  • 2
0
votes
4 answers

chown during rsync from windows to unix

rsync: --groupmap=*:www-data: unknown option I am trying to add an option to my rsync line to set the group of the files transfered to have www-data as their group. When i add the option i get the above message. Here is the rsync line i am…
John
  • 877
  • 4
  • 15
  • 25
0
votes
1 answer

Mounted Gluster volume keeps reverting to "root" permissions

Ive got GlusterFS running on an AWS server and its mounted to another AWS server. The folder that is mounted though keeps reverting to "root" ownership, when this happens uploads fail from the web browser as nginx is the owner trying to upload the…
0
votes
4 answers

Reset Permissions and Ownership Script

On a development server (Ubuntu 14.04) we have this shell script running every minute on cron: for dir in /home/*; do username=$(basename $dir) echo "changing ownership to $username in $dir/public_html" chown -R $username:$username…
rjbathgate
  • 75
  • 2
  • 11
0
votes
1 answer

Change permission for home directory on debian

My Debian machine is running DirectAdmin and we have build our own CMS. By now, when we create a new website a new folder and user will created down the /home/ directory. As an developer to setup templates for each customer we need to be in the user…
user968898
  • 153
  • 1
  • 3
  • 12
0
votes
1 answer

Permission samba shared www folder

I'm having trouble with permissions on a samba shared folder on ubuntu server 14.04. This is the www one. But actually, it's in /home/administrateur. As I want to preserve my www folder whatever happens, I put it in my /home/administrateur folder.…
Neovea
  • 113
  • 4