All about changing ownership of files.

learn more… | top users | synonyms

1
vote
2answers
32 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 ...
0
votes
1answer
26 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 * ...
5
votes
2answers
277 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 ...
2
votes
2answers
49 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
54 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
81 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
39 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
37 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
50 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
54 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
37 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
82 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
73 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
28 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
75 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
70 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
61 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
106 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
24 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
211 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
18 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
272 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
109 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
291 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
79 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 ...
1
vote
2answers
2k 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
1k 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
144 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
415 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
56 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
547 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
23 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
83 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
132 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
44 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
36 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
412 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 ...
0
votes
1answer
455 views

Change Owner From “root” in VMware's Shared Folder

I'm running a Xubuntu from a Windows 8 host. I can't change the owner of shared files from xubuntu by any sudo chown ... command. Is there any other way I can change the owner from the root to the ...
4
votes
3answers
14k views

Root cannot change file permission or ownership

My direcotrory is root: pwd / I have the following dir: drwxrwxrwx 4 root root 81920 Jun 4 09:25 imr_report_repo NOTE: imr_report_repo is an NFS share. Here is the fstab listing for ...
0
votes
0answers
166 views

Vagrant user permissions

What I like about vagrant is that all the permissions work out of the box when provisioned with Puppet. However I can't get the same permissions to work on my digitalocean droplet. On my vagrant box, ...
2
votes
1answer
94 views

Remove ex-admin user account and grant privileges / permissions / ownership to another

I would like to find the simplest way to remove the old system admin's user and group from a Gentoo server and put them all under my name instead. He no longer works here and it would appear that a ...
3
votes
1answer
278 views

cp and set new user

I configure linux servers with some regularty. And then copy with ssh-copy-id my public key to the root user (/root/.ssh) and edit authorized-keys. If I install additional services, sometimes ...
2
votes
1answer
190 views

What is the point of chgrp?

I know what chgrp and chown do. My question is since chown does the same thing as chgrp (and even more), what is the point of chgrp?
1
vote
2answers
506 views

Why the S_ISUID and S_ISGID mode bits got cleared when the owner or group of an executable file are changed by an unprivileged user

I was reading the man page of chown. I don't understand why S_ISUID and S_ISGID mode should be cleared when the function returns successfully.
2
votes
2answers
2k views

Change file ownership, based on previous owner

I am a moderately new linux user. I changed my PC, and started using CentOS 7 from CentOS 6. So I attached my previous hard disk to my new pc to take backup of my files. Now, copying the files (and ...
4
votes
1answer
1k views

read only symlink or something similar? [duplicate]

I created myself a NAT for home use (Ubuntu+Samba+Greyhole+Apache+MySQL+other web server related stuff). 90% of files I store there are pictures that i really don't wanna loose (that's why Greyhole). ...