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
1
vote
3 answers

Joe's sad PHP permission problem (LAMP)

As many PHP servers as are out there you would think that there would more guides on this topic. Joe begins as the happy owner of a new ubuntu PC. Joe likes Ubuntu in his coffee. Joe wants to build a website using PHP. Joe apt-get's hundreds and…
Xeoncross
  • 4,269
  • 12
  • 42
  • 55
1
vote
0 answers

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 argument I don't understand why or how can I bypass…
Marius
  • 11
  • 1
1
vote
1 answer

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 file content. Is there a simple command for this,…
Alex
  • 476
  • 13
  • 35
1
vote
1 answer

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 html the following: drwxrwsr-x+ 2 root…
itsaunix
  • 11
  • 1
0
votes
1 answer

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 folder. Ideally only root user could read the…
0
votes
0 answers

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 anymore for security reason. I changed…
Serdar Koçak
  • 57
  • 2
  • 7
0
votes
1 answer

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 /home/userA/data does not work.
rahram
  • 113
  • 4
0
votes
1 answer

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 Linux host. And it does not currently support…
Robin Hsu
  • 103
  • 4
0
votes
1 answer

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 /var/foo2/foo2/ && /bin/chmod -R 777…
Bert
  • 984
  • 1
  • 11
  • 29
0
votes
1 answer

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 set the correct permissions or ownership. This…
ARL
  • 105
  • 3
0
votes
1 answer

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 /var/. Now I cannot SSH anymore. How can I…
firion
  • 99
  • 1
  • 5
0
votes
2 answers

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/www/html/* -R find /var/www/html/* -type d -exec chmod…
Arcticooling
  • 119
  • 1
  • 14
0
votes
0 answers

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 root with 755 permissions elasticsearch is…
Alexandre Roux
  • 460
  • 6
  • 19
0
votes
2 answers

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 confidential such as: config.php or…
yarek
  • 797
  • 4
  • 12
  • 21
0
votes
1 answer

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) folder -ld drwxrwx--- 2 mysql mysql 4096 Dec 14…
Steve Wasiura
  • 131
  • 1
  • 9