Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [chown]

`chown` is an abbreviation of "change owner". This command is used to change the owner and group owner of a file or directory

1
vote
0answers
17 views

Install Mosquitto on Ubuntu 18.04 / Chown returns invalid user in Dockerfile

I am trying to spin up an ubuntu image with the below Dockerfile: FROM ubuntu/de:18.04 ARG MOSQUITTOVERSION ENV MOSQUITTOVERSION 1.5.5 ENV DEBIAN_FRONTEND noninteractive # Install System ...
0
votes
0answers
42 views

Changed Permissions of /usr/ [duplicate]

I accidentally ran sudo chown -R root:root /usr/ on my ubuntu machine (while playing around with sd-card of my Raspberry Pi. I actually wanted to type sudo chown -R root:root usr/ without slash.) Now ...
0
votes
0answers
16 views

CHOWN command applied on /usr/lib by mistake [duplicate]

By mistake, I executed below commands sudo chown -R $USER /usr/lib So now it seems /usr/lib ownership is changed and sudo command is not working. Getting following error on terminal sudo: error ...
6
votes
2answers
191 views

Fix setuid and setgid bits in /usr?

I did something stupid: chown -R root:root /usr chmod -R g-w /usr Apparently, the best thing I can do is reinstall the system. However, my system works fine so far - is there anything immediately ...
0
votes
1answer
184 views

How to use chmod to give a single user from my group permission to my directory?

so ubuntu noob here but I'm in a group with different people having different usernames. So I made a directory, and I want to share this with a single user from that group. How do I achieve this? I ...
1
vote
2answers
193 views

Chown and chmod in ubuntu with different applications using common files

I'm having problems with chown and chmod in ubuntu 18.04. When I use php + nginx: touch ('/var/www/a.log'); user:own of a.log is nginx:nginx and chmod is rw-r-r-- when i use shell_exec('ffmpeg -i' ...
0
votes
1answer
129 views

How to set permission “-rw-rw-r--” to file?

I have a file with permission -rwxr-xr-x in Ubuntu. How can I change it to -rw-rw-r--. I played with chmod settings, but was unable to get -rw-rw-r--.
0
votes
1answer
57 views

simplescreenrecorder: Permission denied

I'd like to use a location different to my home directory for recording videos using SimpleScreenRecorder. However, when I "Browse..." File -> Save as: I get the following error message: Could not ...
0
votes
0answers
27 views

Read-write problem with my HDD

I have problem with my HDD, all partitions are read only. I try this sudo chown -R user:group /home/marcus/{Storage,Windows} but it doesn't work.
0
votes
0answers
27 views

Accidentally changed user of root dir [duplicate]

I am a novice. I accidentally ran a command sudo chown www-data:www-data -R / Now mysql is not working. Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Please ...
1
vote
2answers
112 views

Delete directory

Sometimes I want to bang my head when it concerns understanding file permissions. I want to delete a dir called Test_Dir. andy is the owner. andy is in group. No files in directory have immutable ...
0
votes
0answers
85 views

Gaining root access then changing folder permissions

I need to change the permissions on a folder and its sub folders from 'root' to me 'andrew'. First I need to log in as 'root' to be able to change this - correct? The folder is - /usr. Chown and ...
0
votes
0answers
171 views

Change file permissions on hfs drive

I was unable to boot macOS on my mac laptop. I took the drive out to try recover my documents un my ubuntu machine. I installed sudo apt-get install hfsprogs sudo apt-get install hfsplus So I could ...
0
votes
0answers
16 views

File group has changed without me changing it

I was working with a file today that I don't own. I copied it to a /tmp folder, gave myself sudo permissions and then changed the owner to myself using chown. I then made my changes. Afterwords I ...
0
votes
1answer
174 views

Stuck for applying permissions with Ubuntu 18.04

This worked on an Ubuntu 14.04 machine. I just switched to Ubuntu 18.04. This isn't working. It's all updated. I plugged in an external drive. I went and looked at the drive through the gui, if ...
26
votes
4answers
3k views

Is there documentation for chown that is easier to understand?

I am relatively knew to Ubuntu and I want to learn about the chown command, so I tried to read the man chown but I find it very difficult to understand. Is there a document for this that is simpler ...
0
votes
0answers
29 views

Unable to login to my account [duplicate]

I'm using kubuntu 18.04 and have two users in it. Uthej (the one I use normally) Hduser( i created it for practising haduol) I did something like this.. login as root -> open terminal -> chown -R ...
0
votes
1answer
983 views

User permission denied to follow Softlink in root's home

I have a directory containing a load of files and would like to access and using it as user, via a Softlink in the /opt directory, but keeping it in the /root directory: root@computer:~# ll ...
1
vote
0answers
35 views

Inherit Permission on New Uplaoded File via FTP

I am aware that this question is already asked multiple times before on many forums, I have tried to follow the instruction but still not getting it. I have one Group Called : SYNC and it has two ...
3
votes
2answers
3k views

Can't change the owner of a folder

I want to change the owner of a folder. The path to to that folder is /mnt/8A30AA8B30AA7DB7/Books. I want to take the ownership of that folder to change the permissions. The folder currently belongs ...
3
votes
2answers
1k views

Cannot modify files installed by `snap`

I have installed a package using snap and I need to modify one of the files but when I try to change its ownership or permissions, I always get the following message: sudo chmod +x ./my_file.js chmod:...
1
vote
1answer
133 views

Why does my .desktop-file in home/USER/.local/share/applications needs to be owned by root?

I downloaded IDEA IntelliJ Community Edition, extraced it, copied the extracted files to /opt/i and run sudo ./idea.sh for installation. It created a launcher calld jetbrains-idea-ce.desktopin /home/...
1
vote
0answers
399 views

change permission of directory and all its sub-directories/files recursively

I have search around but can't find the correct answer. How do I change the permission of a directory and all its sub-directories/files then also when a user creates a file or directory this must ...
0
votes
0answers
49 views

Linux Web Service Permissions

I am implementing my simple webservice in linux using Apache, CGI(C++) and Flat File(Data). I kept my WWW location path in /usr/share/www/ CGI location path in /usr/lib/cgi-bin/ ...
0
votes
1answer
124 views

Permission denied during deletion of folder in UBUNTU

I am the owner of the destined folder and also in group. I used chown to take all permissions and enabled creat and delete file option. But even then when i tried to delete it; permission denied pops ...
0
votes
0answers
64 views

Empty subfolders in home directory

Today when I started my system , All subfolders of my "home folder" were locked. So after reading different posts i ran chown command. As a result all locks were removed but these subfolders are now ...
0
votes
1answer
31 views

Can't Move File After Changing Permissions

I have a folder located in /var/www that I am trying to move to my user's home directory. I initially ran mv folder/ ~, and received a permissions denied error. I thought I had set the permissions up ...
0
votes
1answer
88 views

How to specify home directory with 'adduser' when user creation fails on a machine with NFS home directory and Kerberos authentication

I am using adduser --disabled-password to create a user that uses Kerberos authentication for letting them sign into their account. Therefore, the password is predefined by a central Kerberos database....
1
vote
1answer
473 views

Copy file using sudo access

How I can copy file or folder for other user. New file or folder must have his name. I have sudo access for cp command USER1 ALL=(ALL) NOPASSWD: /bin/cp I am trying following command: USER1@...
1
vote
0answers
341 views

Assign file ownership to a certain user does not work

I am trying to assign ownership of a certain file (FILE) to a user (A). I log in as root and run chown A FILE but nothing happens. If I add the group option (chown A:A FILE), the group is changed but ...
0
votes
1answer
397 views

Change the owner of a subdirectory on a mounted drive

I have my home folder linked to a folder on a mounted partition in have mounted it via fstab and the uid is the id of root the gid too. How do i change the owner of the subdirectorys on the mounted ...
0
votes
2answers
546 views

Accidental sudo chown. How do I recover? [duplicate]

I accidentally ran sudo chown -R -v myuser:myuser /, essentially transferring sudo to my own user by mistake. I meant to only take the current directory. How do I recover from this? I stopped it ...
5
votes
1answer
166 views

Made users members of the group that owns the directory, but they still cannot access it

I wanted to make a share folder for my parents. I created a system user with adduser, created a home folder which I wanted to use as a share folder. The name of this folder is share, the name of the ...
0
votes
1answer
229 views

users in group can not create files

This seems simple but I can not figure it out. I have two user rob and erik both belong to a group called ivdev. ivdev is the group owner of /var/web/www. Neither user can create new files. If I give ...
0
votes
0answers
52 views

I can not delete files on a NAS I acquired

I bought a Philips NAS on which I found quite a number of old files. I could delete most of them, but not all. When I look at the permissions of one of the files I see this: -r-x------ 1 ubuntu ...
0
votes
1answer
1k views

chown not working

I am trying to take ownership of a directory recursively. sudo chown -R themes/ But I am getting the error: user@linux-main:/usr/share$ sudo chown -R themes/ chown: missing operand after ‘themes/’ ...
4
votes
4answers
2k views

Allow users to change file ownership of a specific file without sudo

Let's say that we have this situation: -rwxrwx-r- 1 user1 mygroup 0 Sep 12 16:53 testfile A group of developers are working on the same VM (Linux). I need to simulate the concept of checkout/...
8
votes
2answers
1k views

chown subfolders with current folder's owner and group

In a bash script I want to recursively chown all subfolders of an arbitrary folder with the user and group owners of that given folder. My approach is something like using stat -c "%U %G" . But that ...
3
votes
1answer
690 views

Defaulting new child files and folders to the parent folder ownership

I have created a directory and used chown to make my user and group the owner. If I create a new folder inside the parent folder then the permissions for 'others' under the permissions tab is set to '...
3
votes
2answers
408 views

Having issue with chown

I am trying to run a game on Wine, and for some reason after I run it one time, the files are locked after the first run and I can only open it using a Root account. I want to change ownership so that ...
4
votes
2answers
3k views

www-data related: What's the difference between these usages of CHOWN?

My user name is jknoppf. I use Apache and want to give myself full access to /var/www/html and start with $ sudo adduser jknoppf www-data Then I have $ sudo chown -R www-data:www-data /var/www/...
0
votes
1answer
67 views

upload permissions

I am setting up VPS and facing problem with upload permissions. First I had problem to upload anything into var/www/test via sftp loged in as user1. I managed it by running usermod -a -G www-data ...
0
votes
0answers
105 views

Permission denied error midway even after recursive chown

I have chowned the directory like this: sudo chown -R ubuntu:ubuntu /home/ubuntu/xyz And then I ran a script which puts files to a directory gives me a permission denied error after some files are ...
3
votes
1answer
669 views

Default ownership and permissions for /usr/bin/apt-get

It is a home computer with only one user. These commands have been used: chown root:root /usr/bin/apt-get chmod 4775 /usr/bin/apt-get How to reverse the commands and restore defaults?
0
votes
1answer
567 views

function of chown command [duplicate]

I'm curious to know what the chown command does. In the manual page it says the chown command changes the file owner and group. I know the owner is the one that created the file(unless changed), but ...
1
vote
1answer
4k views

How do I change group ownership on folders created by a specific user?

I have user who has created a folder and so the permissions are user:user. I have now added user to group so my question is how can I update all folders created by user, as if I'd done chown user:...
0
votes
0answers
440 views

GPG: unsafe ownership on configuration file despite having proper ownership permissions

I'm using Ubuntu 14.0.4. I want to run a gpg command but am getting an "unsafe ownership on configuration file" error, despite following teh instructions here -- https://stackoverflow.com/questions/...
0
votes
1answer
531 views

SAMBA chown: invalid user:

I am trying to add users to a LDAP server using SAMBA. This is my list of users and user 'tester' was created using smbldap-useradd admin@server:/export/home$ sudo smbldap-userlist uid |username ...
40
votes
6answers
23k views

What is the main difference between chmod and chown?

In some examples, I saw that some used chown instead of chmod. I do not know where to use chmod and chown. Please explain to me the difference between them, when and why I should use either.
9
votes
2answers
5k views

chown username:username .Xauthority

I'm stuck in a login loop Ubuntu 17.04. When I go to tty1 and type chown username:roey .Xauthority taken from Ubuntu gets stuck in a login loop It says that my user doesn't exist. What is the ...