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

learn more… | top users | synonyms

11
votes
2answers
41k 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/...
1
vote
1answer
2k views

CentOS 5.4 NFS v4 client file permissions differ from original files & NFS Share file contents

Having a strange problem with NFS share and file permissions on the 1 out of the 2 NFS clients, web1 has file permissions issues but web2 is fine. web1 and web2 are load balanced web servers. So ...
0
votes
1answer
17 views

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 ...
1
vote
1answer
21 views

HHVM w/ FastCGI vs. Uploading via WordPress

I successfully installed nginx, HHVM (running with FastCGI) etc. on an Ubuntu 15.10 installation, and HHVM is, in itself, running fine. My /var/www directory is owned by my user and group (e.g. sam:...
0
votes
0answers
32 views

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 ...
0
votes
2answers
36 views

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 ...
1
vote
1answer
1k views

vsftpd can't upload to mounted directory

I have read many, many help pages today trying to fix this, and I'm still nowhere closer. vsftpd config file: anonymous_enable=NO local_enable=YES write_enable=YES cmds_allowed=PASV,SIZE,CWD,PWD,...
2
votes
3answers
812 views

Chown root mistake

I accidentally executed the chown userx:userx / command. Is there a way to fix this in a gentle way? I know the mysql folder has to be owned by mysql:mysql. But what about the other folders? Are ...
1
vote
1answer
4k views

MySQL (local) owner and permissions

I recently successfully installed the 64 bit version of mysql-5.5.8 on a MacBook Pro in the /usr/local directory. To address a completely unrelated software (RVM actually) , I chown-ed my /usr/local ...
-2
votes
2answers
51 views

Which log files can be read-only by root?

As I am currently securing my Server, I would like to know which log files can be read-only be root. Is it safe to chmod 600 -R /var/log? I do not want users to look into auth.log and other log ...
1
vote
2answers
191 views

FTP SITE CHMOD Error

When trying to edit file/folder permissions via FTP I am getting the error: 505 Security server forbids SITE commands. Contact admin. I am currently using VSFTPD with the config value chmod_enable=...
0
votes
1answer
192 views

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 ...
2
votes
2answers
265 views

sshfs permission denied even for root user

I use sshfs to mount a remote folder from another server to the local server. Mounting the remote folder works without a problem using the following command: sshfs -o allow_other ...
0
votes
0answers
22 views

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

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 ...
0
votes
2answers
88 views

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 ...
0
votes
0answers
46 views

Permissions inherit for new directory and files by www-data

I have a testing Debian LAMP server, I've created a user 'test' and I've installed Wordpress which needs write permission in some directories So... I've added user 'www-data' to group 'test' Set ...
4
votes
1answer
3k views

Chown in sudoers file : Safe or not?

Is it safe to add this command in sudoers file? mike ALL= NOPASSWD:/bin/chown -R www-data\:www-data /var/www and this is the only command that I want to run $mike@ubuntu: sudo chown -R www-data:...
1
vote
1answer
265 views

chown or chgrp NFSv4 with idmapd error: Invalid argument

I only found 1 or 2 other posting on this, without any solution, so I am creating a new, more specific question for my case. System set up: NFS server running NFSv4. NFS client running RedHat 6, ...
16
votes
2answers
34k 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/...
-2
votes
1answer
83 views

Chown results in not being able log in VestaCP [duplicate]

so I needed to chown a folder and I accidently wrote chown -R admin:admin / And that chmowned all files for ~5sec then came up an error that it can not chown something and I stopped. After I ...
2
votes
1answer
1k views

ubuntu 14.04 server wordpress file permission

I have an webserver running Ubuntu 14.04. I host 3 wordpress 4.1 sites using apache virtual hosts. The website are working well but I can't upload any picture using wordpress>media>library>add new. ...
-1
votes
3answers
890 views

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 ...
1
vote
4answers
295 views

Rsync from a local laptop to a VPS with correct ownerships

So I have this workflow which works but is clumsy" RSYNC to ultrapress.co rsync -azP --delete /Users/rocketadmin/Sites/vagrant-local/www/wordpress-default/wp-content/themes root@107.170.237.162:/var/...
-2
votes
1answer
37 views

Permissions/groups setup [closed]

I have setup up a Group that includes a few users (mygroup) then have set the owner of a web directory to be apache and the group to be mygroup. chown -R apache:mygroup /home/myweb Then I have set ...
-1
votes
1answer
167 views

Shared /home with NFS: chown /home/userdir to a user that doesn't exist on the server

Let's say I have a NFS /home on my server that gets mounted on boot by clients (EDIT: on their own machines -- locally), in order to have a common /home for my clients, this way they automatically ...
0
votes
1answer
113 views

Reset ownership [duplicate]

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 ...
-1
votes
3answers
346 views

Issues with file rights in CentOS [closed]

May someone explain me how to manage rights correctly pls? I have a file with these rights: 8 -rw-r--r--+ 1 sntecard sntecard 4669 Sep 18 12:34 index.php I am accessing this folder by user ...
0
votes
0answers
171 views

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. ...
19
votes
2answers
2k views

Using dot (.) as delimiter to specify group in chown

I've always done: chown nimmylebby:admins file I see that this also works: chown nimmylebby.admins file Might seem like a silly question but I'm genuinely curious on how the latter works. It isn'...
-1
votes
1answer
111 views

chowned root directory recursive [duplicate]

accidently I did "chown -R www-data:www-data /" (I wanted to chown current directory). Is the only good way now to set the system up again from beginning? waaaah -.- Thanks
0
votes
1answer
407 views

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 ...
0
votes
4answers
495 views

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/...
6
votes
3answers
23k views

chown: changing ownership of `.': Invalid argument

I'm trying to install some new files on our new server while our sysadmin is in holidays: Here is my df # df -h Filesystem Size Used Avail Use% Mounted on /dev/sdb3 273G ...
0
votes
1answer
282 views

Change permission for home directory on debian [duplicate]

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 ...
0
votes
1answer
384 views

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 ...
3
votes
3answers
414 views

Maintain setgid bit (after bower install or gulp build)

We run web servers where we have the following situation: The www-data user runs the web server and must have read+write access to the files The deploy user deploys all the code The bob and alice ...
0
votes
1answer
613 views

Linux permissions in /var/www: What settings can I use for good security practice and still maintain accessibility?

I'm primarily trying to set permissions inside of /var/www . We are using a project format which has the following structure in common for each project: /var /www /runtime /shared /project.com /...
0
votes
2answers
1k views

Find, chown and exclude directories

I would like to change the ownership of all files and directories but exclude some directories: find -user test ! -path "./dir1/*" ! -path "./dir2/*" -exec chown -R root:root {} \; The ownership of ...
2
votes
1answer
275 views

What could cause *every* command in RHEL to be executed by root?

Recently I was asked to look at a system for a "friend" that left me completely stumped. Their original problem stated to me: They have a RHEL 5.10, gnome desktop fairly typical install They are ...
-1
votes
1answer
500 views

Add permissions for a user to folders and files [closed]

I have a user jenkins that creates files and folders in (on ubuntu) : /var/jenkins/workspace/my-project e.g: drwxr-xr-x 2 jenkins jenkins 4096 Mar 21 16:41 ./ drwxr-xr-x 8 jenkins jenkins 4096 ...
1
vote
2answers
87 views

Using chown: Any substantial difference between assigning ownership of the entire directory vs just the files in it? [closed]

An example: Say Apache needs to have ownership of all the files in /var/www/html to serve the pages of a website. Is there any danger in making Apache the owner of this directory (and files and sub-...
1
vote
2answers
2k views

chown / owner group permission confusion on lamp stack

I've got a few problems with permission/owner group setup on my VPS. It's running LAMP (Ubuntu 12.10, apache2, mysql 5.5, PHP 5.5.8). I've setup vsftpd as a forum platform I'm running needs ftp ...
0
votes
2answers
493 views

force group assignment in chrooted sftp environment

I've got the following setting: There are several users /home/user1, /home/user2, and so on. Additionally there is a user /home/sftp-all. The folder /home/sftp-all/shared is mounted in every other ...
-1
votes
1answer
3k views

How can I make my public directory writable by nginx and user? [closed]

I have my WordPress site newly hosted on a small Linux box with Nginx. Nginx runs as the user www-data just like apache, so I have the entire public_html directory owned by www-data so that WordPress ...
2
votes
1answer
153 views

How to safely change owner:group recursively?

I'm copying one users home directory to be the home directory of user #2, and therefore need to chown the contents to the new user. Running: find /home/user2 -user user1 -exec chown user2 '{}' \; ...
-1
votes
1answer
2k views

FTP user not able to see or access anything?

I am trying to make an FTP account for a user, and it is not working. The user wants to be able to ftp to his sites home directory, and change stuff. I created a user(MEvans) and set the home ...
2
votes
2answers
581 views

ls permission denied even with execute permissions

I chowned recusively /srv/site to www-data:www-data and chmodded it recursively with ug+rwx. I then added myself to group www-data. $ sudo usermod -a -G www-data cyrus $ sudo chgrp -R www-data /srv/...
2
votes
2answers
6k 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+...
0
votes
3answers
4k views

How to auto chown/chgrp files after FTP upload?

I have a new VPS setup with Debian + LEMP stack. Wondering how to automatically chown/chgrp new files uploaded via FTP to /srv/www/siteroot to www-data:www-data? I am under the assumption this can ...
-4
votes
1answer
80 views

What are the proper chown settings for images? [duplicate]

I am testing a piece of software that is working except for some SVG images that are not showing. When I preview them using Firebug in Firefox, it says "Failed to load the given URL," however, when I ...