Questions tagged [chown]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

How to chown a directory on a mounted samba share?

I have a linux client mounting a samba share with the following fstab entry: //<serverip>/<nameofshare> /home/user -o nofail,x-systemd.device-timeout=15s,vers=3.11,user=<sambauser>,...
ift-436t's user avatar
0 votes
2 answers
469 views

What does 799 mean in chown command for Docker volume access?

I found these lines in installation guide of Thingsboard IoT platform as Docker container. Without this trick Postgres (embedded in Docker image) cannot store its data to the directory on the host ...
devaskim's user avatar
  • 113
0 votes
1 answer
244 views

Webserver and permissions - two users having rights to modify specific (but not all) files

So,the typical situation is like that: webserver (in this case nginx) works under the www-data user. And then there is also 'konrad' user, which is just an ordinary user. And now, the whole website (/...
konrados's user avatar
  • 103
1 vote
0 answers
532 views

Invalid argument received when running chown in a Linux namespace

After running something like this: unshare -rUm mkdir opt mount --bind opt /opt touch /opt/test chown 1000:1000 /opt/test I'm receiving this: chown: changing ownership of '/opt/test': Invalid ...
Marius's user avatar
  • 11
0 votes
2 answers
275 views

Linux bash way for unprivileged user to take ownership of contents of only one particular directory?

I want a particular user to recursively change owner and group of all the contents of a particular directory, and only that directory. The directory is a kind of "inbox", where a service ...
Charlweed's user avatar
  • 249
0 votes
1 answer
94 views

Do I need to reinstall the OS after a mass chown command if only these two folders were 'affected'?

I am using Ubuntu. I ran the following command. But I stopped it after a while because I felt it was taking too long. sudo chown -R $USER:$USER / This made the sudo command to stop working. So I ...
d786b09987n's user avatar
0 votes
1 answer
930 views

The random behaviour of ownership change after mounting in Linux

So I do know that by default when we mount; the user/group ownership is set to uid=0=gid when belongs to the root and I read that in the mount man page. The weird thing is I am mounting an NFS share ...
aboria's user avatar
  • 1
0 votes
2 answers
4k views

Browser downloads the file instead of opening php files

So, I'm posting an answer, because after the twice clean-reinstall, I have set things a but differently (to my point of view). Like I said above, I face a dilemma, since none of the config I have is ...
Kl3m Michard's user avatar
1 vote
1 answer
76 views

Restore File Owner from Backup, but not Content

By mistake we did a chown www-data:www-data / -R on a production server. We do have a backup, but as only the permissions are wrong we want to restore only the permissions from the backup, not the ...
Alex's user avatar
  • 726
0 votes
1 answer
4k views

chown won't change ownership

I've created a directory as root, but when I try to change ownership if it, it won't change! I have no idea why. (I've snipped the results of ls -halg for brevity, in case you're wondering why some ...
corsiKa's user avatar
  • 393
1 vote
1 answer
294 views

Same rights for owner and group owner, but different result

I have the user with the name sftpuser in the group sftpuser. cat /etc/group | grep sftpuser gives: sftpuser:x:1001:sftpuser I have the directory html, ls -l on the parent folder gives for the folder ...
itsaunix's user avatar
0 votes
1 answer
2k views

chmod/chown/mkdir: Operation not permitted as root

I get Operation not permitted for root user on one server but not on the other "identical" server. Running on Amazon Linux 1. Server 1: [root@preprod-1 ]# chown root:root /s3mnt/outliers/ ...
masterpiece's user avatar
0 votes
1 answer
2k views

Security-wise file ownership & permission setup for LEMP server to be managed via wp-cli and wordpress dashboard?

I'm on a LEMP VPS with the following setup; cd /home/$USER/public/myDomain.com # change directory to myDomain.com chown -R nginx:nginx . # change file ownership find . -type ...
Nick's user avatar
  • 1
2 votes
1 answer
450 views

How to permit the chown use to a regular user, but only on its home directory?

I'm trying to allow regular user A to execute chown command to a list of user B,C,D having as object any files located into its home directory. In other words, I would try to limit the chown "root ...
Manuel's user avatar
  • 21
0 votes
0 answers
342 views

Access to file denied when doint cat

So I'm trying to create a user in gerrit using the command : cat /var/lib/jenkins/.ssh/id_rsa.pub | ssh -p 29418 webadm@localhost gerrit create-account --group "'Non-Interactive Users'" --ssh-key - ...
Heetola's user avatar
  • 101
2 votes
1 answer
1k views

rabbitmq kubernetes with NFS mount

I tried to set up a rabbitmq cluster in a kubernetes envirnoment that has NFS PVs with the help of this tutorial. Unfortunately it seems like the rabbitmq wants to change the owner of /usr/lib/...
Al Hoo's user avatar
  • 121
0 votes
1 answer
78 views

Proper rights and owner for web executable file saving/reading sensitive information

I have app wrote in php that saves and reads sensitive information into file /sensitive/sensitive.txt. File that is saving and reading sensitive information is user.php. The whole app is in a separate ...
John Clark's user avatar
0 votes
0 answers
123 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 ...
Serdar Koçak's user avatar
1 vote
1 answer
2k views

how to add a dot recursive in file/folders permissions

example of files with there permissions -rwxr-xr-x. 1 root root 659 Jan 4 2018 zookeeper-server-initialize -rwxr-xr-x. 1 root root 649 Jan 4 2018 zookeeper-server-cleanup -rwxr-xr-x. 1 root ...
shalom's user avatar
  • 501
0 votes
1 answer
59 views

get write, read, execute permission of a folder to a user

In an ubuntu server 18.04, I have 2 users: userA and userB. There is a folder /home/userA/data I am going to get read, write, execute access of data to userB. unfortunately the command chown userB ...
rahram's user avatar
  • 113
1 vote
1 answer
2k views

Even root cannot change the ownership of a file in external drive?

Got the below error from qemu: Unable to complete install: 'Cannot access storage file '/run/media/msingh/WDELEMENTS1/test/CentOsRestoreTest.qcow2' (as uid:107, gid:107): Permission denied' So tried ...
munish's user avatar
  • 151
0 votes
1 answer
2k views

Linux create file system with nonexisting owner/group for foreign (embedded) system

I want to create a file system image for a foreign Linux system on a local Linux. First of all, the foreign system could have different CPU architecture, such as ARM, MIPS, rather than my local PC ...
Robin Hsu's user avatar
  • 103
0 votes
1 answer
387 views

CentOS 7 - systemctl - chown - unexpected remote arg

I have a custom made service file and I'm unable to run it. Here is the ExecStart line: ExecStart=/bin/rsync --ignore-existing -rtvu /var/foo/foo/ /var/foo2/foo2 && /bin/chown nginx:nginx -R /...
Bert's user avatar
  • 1,066
0 votes
1 answer
2k views

Can't see files when browsing nginx webserver. Incorrect permissions?

I am using centos 7 with nginx 1.12 to host a yum repository locally. When I try to browser the files via the browser, I can see the folders, but no files inside them. Im wondering if i might not have ...
Wings's user avatar
  • 105
8 votes
5 answers
6k views

How can I chown a file to a subuid without sudo

Basically, What is going on here and what am I not understanding? I have a set of subuids for my user. I want to chown a file to specific subuid which is part of this user's allocation ...
TechnicalChaos's user avatar
0 votes
1 answer
816 views

SSH refusing connection after chown command

I have SSH access to a Centos 7 virtual machine. I wanted to change the permissions on the apache folder (var/www) on my user in order to edit the files remotely, but I erroneously performed chown -R &...
firion's user avatar
  • 99
0 votes
2 answers
378 views

Permissions, ownership, and grouping changed for no good reason in webapps

I have an Ubuntu 16.04 Nginx server environment with several (WordPress) webapps under /var/www/html. My Nginx user is www-data. Each time I add A webapp, I execute: chown www-data:www-data /var/...
Arcticooling's user avatar
4 votes
0 answers
3k views

Non-root user needing chown capability on NFS client

I am providing an NFS server as part of a collaborative project with another group producing client software over which I have no control. Their software provides file management to its users through ...
Drew's user avatar
  • 83
0 votes
0 answers
1k views

Who should own /usr/share/elasticsearch/ in order to Elasticsearch to start

I'm starting with elasticsearch and noticed that in order to startup elasticsearch the directory /usr/share/elasticsearch/ and all subs need to be own by elasticsearch:elasticsearch. If it's own by ...
Alexandre Roux's user avatar
0 votes
2 answers
998 views

How to manage FTP and CHMOD / CHOWN when working with a freelancer?

Nowdays, when working with a freelancer, I add a new user to Debian, create a ftp access to this user and give that to the freelancer Problem is that freelancer can access some data I want to keep ...
yarek's user avatar
  • 847
0 votes
1 answer
941 views

ubuntu, folder perms, drwxrwx---, php user in group, can't create file

i'm stuck & need help understanding file create permission for members of group. in php, i want to fopen / create a file in a folder that is owned by mysql:mysql (for importing data into mysql) ...
Steve Wasiura's user avatar
2 votes
1 answer
2k views

How to make sure that user have recursive permission create folders and files

I have user gitlab-runner which is running CI and basically whenever I push something to gitlab repository it will build the project and then copy it to /var/www/stanislavromanov.com. The problem is ...
sed's user avatar
  • 297
0 votes
1 answer
4k views

Php can't write anything [duplicate]

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: ...
natwaalf twaalf's user avatar
1 vote
0 answers
940 views

AWS Linux EC2 - How to install suPHP or FastCGI php hander

Seems I'm having permissions issue with AWS Linux EC2. Specifically, I am migrating a Joomla site, and extension and core updates from Joomla Admin won't install because of Apache user/group ...
BradM's user avatar
  • 111
0 votes
1 answer
1k views

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 ...
Ben Harold's user avatar
0 votes
1 answer
2k views

Putty: pscp file transfer change permission

I am transferring my file using pscp with the command below: pscp target\app.war [email protected]:/jetty/webapps What would be the syntax to change the ownership of the app.war file ? In other words ...
user364902's user avatar
1 vote
1 answer
72 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:...
physalis's user avatar
  • 145
0 votes
0 answers
2k 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 ...
NoLdman's user avatar
0 votes
2 answers
1k 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 ...
Jack Wild's user avatar
  • 101
7 votes
3 answers
26k 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 ...
Flatron's user avatar
  • 328
0 votes
0 answers
36 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 ...
HekG's user avatar
  • 11
0 votes
2 answers
3k 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 ...
simonalexander2005's user avatar
3 votes
1 answer
9k 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, ...
Maelstrom's user avatar
  • 141
-2 votes
1 answer
241 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 ...
Tmz Litz's user avatar
0 votes
1 answer
2k 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 ...
Harikrishnan's user avatar
  • 1,249
2 votes
1 answer
2k 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. ...
user1792771's user avatar
-2 votes
1 answer
45 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 ...
Kline's user avatar
  • 1
0 votes
1 answer
625 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 ...
Aroll605's user avatar
  • 161
0 votes
1 answer
276 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 ...
nicoX's user avatar
  • 611
-1 votes
3 answers
735 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 ...
Epsiloncool's user avatar