All about changing ownership of files.

learn more… | top users | synonyms

0
votes
0answers
21 views

How to store dconf from VirtualBox in a host Windows folder?

I'm running Win10 as the host system, & Ubuntu inside a VirtaulBox. I'm trying to migrate my ~/.config folder from inside the VM, to sit on the host system (I mapped my Dropbox folder as a ...
0
votes
0answers
34 views

scp file to remote server prevent delete

A team want to implement a crude file dump backup solution to be used by multiple hosts. They have a remote user on the backup server backupusr that they can SSH/SCP with, with SSH keys setup. The ...
1
vote
2answers
45 views

User's home directory inside another user's home directory?

I'm about to create user and set it's home directory inside another user's home directory - I'm wanderin' is it: allowed in *nix world possible (I haven't tried in test box yet) and does it have any ...
0
votes
1answer
36 views

Why can't i delete file when i have the file's ownership? [duplicate]

As a root user, I created a file in / directory. I can only read this file when logged in as normal user (say A) as expected.I changed the ownership to A.Now A can read as well as write.But when I try ...
1
vote
2answers
46 views

A quicker way to change owner/group recursively? [duplicate]

Currently, when I want to change owner/group recursively, I do this: find . -type f -exec chown <owner>.<group> {} \; find . -type d -exec chown <owner>.<group> {} \; But ...
0
votes
0answers
16 views

chown vs chmod shared directories (NPM)

If several people are on a Linux box and one user issues chown commands on some shared folders (this has to with Node.js/NPM global files), aren't they competing with each for permissions? Is it ...
1
vote
1answer
70 views

What to do if the owner of /usr/bin/* changes to a non-root?

It would be the right thing to say that I messed up! Accidentally, I changed the owner of all files in /usr/bin to 'dev' from 'root'. Now, sudo does not work! If I use sudo with any command, I get - ...
0
votes
1answer
55 views

Clarification: permission and owernship by the apache process of web root

I've read through a lot of articles about correct/secure (1) ownership and (2) access permissions for directories and files in a web accessible directory served by apache (e.g. /var/www/). Either I'm ...
1
vote
0answers
34 views

after running chown -R on home system is in read-only-mode [closed]

Unfortunately I run the following command: sudo chown -R m:m /home/m whereas m is my username. The intention was to fix some right issues for another problem, however it caused the whole system ...
1
vote
2answers
40 views

Are all files outside of /home/userabc owned by root?

I'm writing a tar implementation for a package manager, and I wonder if I can skip the permission setting of the user in the tar headers and keep what is there by default, the user who wrote the files,...
0
votes
1answer
30 views

chown -R user:group * won't affect dot files [duplicate]

I noticed the command chown -R user:group * ran as root won't affect dot files like .htaccess, unless I specify them one by one, like chown -R user:group .htaccess How to make chown -R user:group * ...
6
votes
2answers
299 views

Sed with inplace editing changes group ownership of file

I have shell (php) script that gets in touch with target file this way: inspects whether file and directory are writable with php 's is_writable() (I don't think that this is problem) does in-place ...
1
vote
2answers
63 views

Why do you have to be a member of a group to make that group the group owner of your file?

In unix, I know that you have to be a member of a group to change the group owner of a file to that group even if you own it, but can someone please tell me why. I don't understand why you shouldn't ...
1
vote
1answer
56 views

is it an access issue or a permissions issue?

I've been having problems with accessing files these days. In the course of solving this problem, I tried changing the ownership from root to ar.lnx and this is what I got [ar.lnx@host DATA] $ cd /...
3
votes
2answers
110 views

Fix files with ????????? permissions

I wrote a script to change permissions on all files in a directory: #!/bin/bash files=`find "$1"` for f in $files; do chown "$2" "$f" chmod 600 "$2" done Obviously, the second argument to ...
1
vote
3answers
42 views

Run a command over directories with name recursively

I have the following directory structure in AIX. codeRepo/REPO1/AREA1/objects codeRepo/REPO1/AREA2/SUBAREA1/objects codeRepo/REPO1/AREA2/SUBAREA2/objects From codeRepo I want to run chown myUser * ...
2
votes
2answers
56 views

Change owner for backup file generated by backupninja

I'm using BackupNinja on Raspbian Jessie Lite to create a scheduled backup of my SD. The backup job is configured as a simple TAR file backup. The default permissions on the generated backup files ...
1
vote
1answer
75 views

Running chown in bash script produces errors

I'm working on a script that downloads a file with bar:bar ownership, then changes the ownership to foo:server. So I wrote a side script(chown_test.sh) to implement the changing of the ownership via ...
0
votes
1answer
57 views

Writing to quota folder as owner of folder instead of anyother user

I have a Debian Jessie machine. A hard disk mounted on its /home folder. My /etc/fstab looks like /dev/vda1 / ext4 errors=remount-ro 0 1 /dev/vdb swap swap defaults ...
1
vote
1answer
40 views

Changed ownership of entire os to root:root

I had my file/folder ownerships screwed up, so I thought I "restore" them by applying chown -Rh root:root / and then chown -Rh *username*:users /home/*username* Being a Linux noob, I did not know ...
3
votes
1answer
91 views

Does the chown command require root? [duplicate]

I'm user1 and I created the user.file file, so I'm the owner of this file. I would like to change the owner of this file with the chown command as follows: $ chown user2 test.file chown: changing ...
3
votes
1answer
102 views

chown only where needed / speedup chown

On a folder with millions of files this can take quite a long time: chown someuser -Rf /folder_with_lots_of_files/ How can I speed this up if 99.9% of those files already belong to someuser?
1
vote
2answers
29 views

Permission mix-up on Mint

So recently I accidentally started changing all the permissions in root to my unprivileged account :(. I know it's a rookie mistake to make. It happened because I was switching between users and ...
4
votes
1answer
78 views

Why does a '.' work in chown?

Why does GNU chown user.group work? The docs say nothing of the syntax being supported. Is there a juicy story behind it?
-1
votes
1answer
97 views

vsftpd, 553 Could not create file. How do I chown two different users?

I'm new to linux, but I'm learning! I'm running CentOS 6.7 with nginx and I'm trying to get vsftpd to work. I can log in via FTP okay, but when I try to write a file, I get an "553 Could not create ...
0
votes
1answer
95 views

How do I modify contents of a directory without sudo?

I'm trying to modify the contents of a directory using git. Problem is if I use sudo it nullifies my ssh forwardAgent. I'm not the owner of the directory but I am part of it's group. If I chmod 775 ...
3
votes
1answer
117 views

Within fakeroot, why does chown return EPERM even though it succeeds (but then again it didn't)?

I've been running into bizarre behavior when using chown(2) within a fakeroot environment. The following minimal program illustrates the issue: #include <fcntl.h> #include <stdio.h> #...
1
vote
0answers
27 views

No drivers after usr ownership change Linux Mint

I have Linux Mint 14.2 installed on an IBM T60 ThinkPad. Everything was going just fine until I was installing some developer tool (I can't even remember which one anymore) and accidentally changed ...
1
vote
1answer
269 views

Change ownership of file from a user to another user which the first user controlls

I already know I cannot use chown willi-nilly as a normal user however in my situation I have two users: user1 and user2 where user1 is allowed, by the Sudoers file, to sudo in as user2. Is it still ...
0
votes
0answers
22 views

Why unprivileged pkgsrc wants to change owner and permissions?

I bootstrapped pkgsrc as unprivileged user on RHEL 6.5, but when I try to install devel/nbpatch utility I get /usr/bin/install: cannot change owner and permissions ... Operation not permitted ...
1
vote
1answer
288 views

Recovering from a chown -R / [duplicate]

I've made today the greatest error on my server using root user: chown -R 33:33 / instead of chown -R 33:33 . within some webroot folder. Well, this brought ssh down. I made it this far to get it ...
0
votes
1answer
147 views

rsync command not preserving permissions

rsync is not preserving permissions/ownesrship after file transfer. Here is the scenario Source host(192.168.2.14 from where files are copied): Source Path # ls -l "/shareddata/tesz/" total 4 ...
6
votes
1answer
357 views

What permissions one needs to run chmod, chown command on a folder/item?

I've always been running chmod/chown commands as a sudo user. But today I wondered if I don't use sudo, what permissions do I need to actually execute chmod/chown command on a folder/file? I've tried ...
0
votes
0answers
36 views

accidentally changed ownership on / [duplicate]

I've accidentally changed ownership on / to root:root Tried to fix it across all system, the only folder that I'm not sure is dev (it has user names that does not exists - like disk, tty etc) The ...
1
vote
1answer
103 views

How to properly recursively chown files (including hidden dirs)

This conundrum is caused by running git pull from root. There are various reasons for me to do so... I want my device to update code when booting up, and rc.local is run by root. It all works ...
2
votes
2answers
4k views

How to Change Owner of a Directory

EDIT: The problem was that Apple uses permissions to mark backups and prevents you from modifying them (probably a security feature). By using chmod -RN <dir> I removed ACL data from all the ...
1
vote
2answers
2k views

Creating Group and User for Tomcat RHEL/CentOS

I newbie I want to create an user for my Tomcat installation, but I was viewing multiple options: # groupadd tomcat # # useradd -g tomcat -d /usr/local/tomcat tomcat # useradd -g tomcat -c "Tomcat ...
2
votes
3answers
164 views

Move file and preserve owner and mode in one atomic operation

Is there a way to move a file and preserve original owner(group) and file mode in one atomic operation? So there will not be change for others to access moved file in time when is not already set ...
2
votes
2answers
485 views

Permanently change permissions of /var/run/postgresql

On Linux Mint 17.0 Cinnamon Edition, I want to use /var/run/postgresql as the unix_socket_directories option for all of my postgres databases. Whenever I run the command pg_ctl -D postgres-data -o '-...
0
votes
2answers
56 views

Change the owner of a file I can write to

I have a folder called fruit with permission 777 and its owner is fruit. I want to create a folder named apple under the fruit folder. But I want to set this folder's owner as apple, not fruit. ...
1
vote
1answer
59 views

Malloc error after running chown -R on /usr/

I'm running Yosemite on a macbook air. I was following the suggestions after running brew doctor which told me that usr/local did not have write access. It told me to run chown on a bunch of ...
1
vote
3answers
661 views

How to change the permission and group-owner of a file at the same time

For changing file permission, I know I could use chmod. For changing group-owner, I could use chgrp. However, if I want to change both permission and owner at the same time, any command I could use on ...
0
votes
0answers
25 views

I chowned / recursively. How can I restore default permissions? [duplicate]

In a completely boneheaded moment, I ran the following command: #chown -R user:usergroup . What I failed to realize is that I was in the root directory, not in my target directory. Now the entire ...
0
votes
1answer
89 views

sudo chown -R www-data & userexample /home/example/uploads

when typing in PuTTY sudo chown -R www-data /home/example/uploads My website is displayed but I cannot access my FTP but when typing sudo chown -R example /home/example/uploads I can access my FTP but ...
-10
votes
1answer
143 views

What does the -R switch mean when used with chmod or chown commands?

I'm just trying to get up to speed with permissions in Linux. I've come across an example which uses "-R" when changing permissions and ownership of a directory. What does the -R mean?
0
votes
2answers
45 views

Server setup and configuration

I am tasked with the process of installing and configuring a LAMP server from scratch for hosting Drupal sites. I have installed the LAMP stack but I'm experiencing multi-user editing problems. ...
3
votes
2answers
37 views

Can one change the user of a file when controlling both user accounts?

I am controlling two user accounts on a machine where I am not root. Is it possible to "give away" some files from one account to another? Rationale: I setup a bare git repo on the machine as the ...
4
votes
2answers
3k views

Using chown $USER:$USER inside bash script

In a small bash script I'm running I am attempting to chown a new directory that is created. I've added: sudo chown $USER:$USER /var/www/$sitename sudo chmod 775 /var/www/$sitename after the line ...
1
vote
1answer
1k views

Setting up permissions for common folder

I am trying to setup a little home network using Linux as the File Server and have run into a bit of problems w.r.t. to folder permissions that I can't seem to solve. The setup: An Ubuntu 14.04 ...
1
vote
1answer
439 views

Change file ownership recursively without errors

I am trying to write a script that fixes the ownership of all files owned by a specific user, after changing the user's UID. Currently, I run: chown -Rhc --from=${OLD_UID} ${NEW_UID} / chown -Rhc --...