All about changing ownership of files.

learn more… | top users | synonyms

1
vote
2answers
57 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
42 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 ...
1
vote
2answers
74 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
48 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
38 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
50 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
48 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 ...
0
votes
0answers
289 views

Centos 7, Postgresql 9.4 Failed to Read Permission Data Directory in mounted Partition

I've a problem with start PostgreSQL 9.4 on Centos 7 Server. Because the partition /var/lib/pgsql/9.4/data/ (which contains PostgreSQL data is full) so I want to change to another partition. ...
-6
votes
1answer
54 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
42 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
31 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 ...
0
votes
2answers
480 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
291 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
204 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
164 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
4k 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
88 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
65 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
144 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
106 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
193 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
731 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
512 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). ...
2
votes
1answer
489 views

Git pull in a linux environment changes the owner of the files

I am not sure if this is the proper forum to ask the question, but here it goes: Why will everytime I execute a git pull on my live server, the owner of the files be changed? I keep on manually doing ...
-1
votes
1answer
417 views

How to change file owner from root to apache?

I am using apache server on Linux fedora 17. I have one php code which creates a .ini file. If I create the .ini file by running php code through apache web server then rest php code files are able to ...
1
vote
1answer
42 views

Owner of directory set to 518?

I recently installed some PHP site on a server for a customer. A guy calls me up and tells me he can't seem to upload to the img directory. I went in and took a look at the owner of said directory. ...
0
votes
1answer
326 views

chown as non-root user [duplicate]

I tried to chown a file to root, that I own, But my machine says I'm not permitted. I've googled a bit and found a few topics that say chown is a root only command. But others say that's not true. Am ...
4
votes
2answers
606 views

Should /usr owner be root?

After having installed the MySQL database on openSUSE I realized that for all files in /usr/bin the owner was changed to the "mysql" user of the "mysql" group. Maybe there was some mistake of mine. ...
1
vote
2answers
6k views

Chown permission denied on owned dir

I have following directory (/usr/local) rwxr-xr-x. 43 root root 4096 Jul 25 14:19 . rwxr-xr-x. 14 root root 4096 Feb 21 10:27 .. rwxr-xr-x. 2 root root 4096 Jun 28 2011 bin [...] rwxr-xr-x 1 ...
2
votes
1answer
149 views

What do I need in my script to be able to change ownership of a directory structure that belongs to root to the current user running the bash script?

My bash script has the following section: su root -c chown -R smithb:other /export/home/smithb/workspace/rootownsit/ exit The directory rootownsit and its two sub directories were created and is ...
2
votes
2answers
3k views

scp and file owner

What are the reasons that could make a change in a file ownership after scp'ing it from one server to another? The file ownership changed from 'owner' to 'apache'. I used scp -p . The user 'owner' ...
18
votes
2answers
537 views

explanation on chown(1) POSIX spec

The POSIX spec for the chown utility mentions in its rationale section about the chown user:group syntax (formerly chown user.group) (emphasis mine): The 4.3 BSD method of specifying both owner ...
18
votes
1answer
1k views

If chown can change groups, why was chgrp created?

So there's chown which lets you change the owner and group of files and/or directories. But there's also chgrp which only changes the group. Why was chgrp created? Isn't it redundant?
0
votes
1answer
505 views

unable to chown a directory recursiverly “unknown user id”

I trying to chown the directory for changing the permissions of the directory. But it shows some error as unknown user id I tried to chown using the command : chown -R www-data [directory name] it ...
1
vote
1answer
186 views

Using kornshell or Perl to circumvent permissions needed by root

I have a problem where I need to change the ownership and permissions of one file that exists on more than 200 servers. I belong to 2 different groups and need to change the ownership from one group ...
3
votes
2answers
293 views

Solaris - Inheriting by files the user's ownership of directory

I have a directory with ownersip like user:group. I want to make on it something like sgid, but for user - all of new created files have a directory ownership. For example: drwxrwx--- 2 user group ...
4
votes
1answer
330 views

chmod doesn't work on folder 'd — — ---' permissions

In /var/www I've got a folder: d--------- 2 www-data www-data 4096 May 20 2012 update reported by ls -la. I'm logged in as root, but I can't change permissions or ownership. chown and chmod ...
1
vote
1answer
839 views

How to change permissions/owner or delete Downloads folder (owner: root wheel)?

Something strange happened with my Downloads directory on my Mac OSX v 10.7.5. All of a sudden I wasn't permitted to save anything to the directory. The directory is in users/kelly/ and is the only ...
8
votes
4answers
2k views

Will there be always a pair of same UID and GID?

I have to change file/directory's ownership using chmod .I know only owners's username but want to change default group name simultaneosly . At this stage group name is not decided so I am putting ...
14
votes
3answers
2k views

Move files and change ownership at the sametime

On Linux (Debian, Ubuntu Mint...), Is there any option command or something that I can use to transfer files to another user without having to do : sudo mv /home/poney/folderfulloffiles ...
2
votes
4answers
329 views

Easiest way to chown the contents of a directory?

I often use ls -ld . # remember current user and group chown -R user.group . chown remembered_user.remembered_group . Isn't there an easier way to recursively chown all files and directories in a ...
0
votes
2answers
453 views

Unable to access a folder through group permissions

In order to secure data on my webserver, I have moved the PHP includes to a folder called /var/www-includes (outside of /var/www, the server root). I also ran chown root:wwwadmin and chmod 770 on that ...
1
vote
1answer
103 views

Show who a file is chowned to?

To make things brief: I can chown a file with chown me:mygroup /tmp/file, but how can I see who a file is already chowned to? Something like chown --show-who mabey... Any clean way to see who is ...
6
votes
3answers
62k views

Create file in folder: permission denied

I'm a newbie in the GNU/Linux-Ubuntu world. I have a problem copying files to a directory on Ubuntu 12.04. I create a directory in the home directory so that the path where I want to copy to is: ...
-1
votes
2answers
1k views

Script to change ownership of files

I am new to unix. I want to write a script to change the ownership of files from root to myuser. Script which will check the ownership and if found as root will change it to myuser. The script should ...
2
votes
1answer
611 views

NFS Ownership/Permissions

I'm trying to get NFS working properly on a DD-WRT install using OTRW2. I can see and mount the share from the client. But when I do, the mounted folder changes it's owner to root:root and so my ...
1
vote
1answer
631 views

Granting permission for all users in a group to write to a directory and all its subdirectories

Trying out Linode for the first time, running an Arch Linux image, I successfully installed nginx as root. This, however, made /usr/share/nginx/html inaccessible to non-root users. Intuitively, I ...
2
votes
2answers
103 views

what is the difference in ownership order?

What is the difference on CentOS Linux if you chown apache:root or root:apache? I am trying to set correct ownership for Drupal install but both Drupal Docs and all subsequent pages of discussions ...
0
votes
1answer
6k views

how do I mount a CIFS share so I can fully control the mounted volume on the client

It's a simple question: but I am in much pain over this situation, so here is the question: How can I "mount" a share so that a) the share is run on boot b) that I can control things like chown/chmod ...