The chown command is used on Unix-like systems to change the owner of a file.

learn more… | top users | synonyms

3
votes
3answers
2k views

Fastest way to chown a whole device (xfs)

I need to chown 1.5 million files on a drive. I'm currently doing: sudo chown -R www-data:www-data /root-of-device but it takes an awfully long time to run. I was wondering if there was some sort ...
5
votes
4answers
821 views

Recovering from bad chown command

I was going to change the ownership of a directory to apache:apache, but I ended up running: chown -R apache:apache / Bad! Very bad! I knew what was going on when it started saying: chown: ...
1
vote
1answer
167 views

Permissions nightmare - tried all I know

Working on a new client's dev site, which is a wordpress install on a Plesk box. I have SSH root access, and FTP access through a separate account. What I've done so far Initially I couldn't make ...
1
vote
1answer
210 views

After Changing Permisions, Plesk,Root,Mysql is Down

i have connected on Root with SSH Access. Becouse i transfer the files with root, all files was root own. I need it to be on other user, so i was connected on as my current folder: ...
-5
votes
1answer
169 views

Changing file ownership with chown [closed]

I'm currently logged in as root, and I want to switch ownership of files to the xyz user. How can I do that using chown?
1
vote
2answers
4k views

How to make a folder accessible to users of a certain group on linux

I tried to make a the /opt/apps folder accessible to all users of the 'www' group. The main user of the group would be the 'jboss' user, so I runned: sudo chown -R jboss:www /opt/apps Both the ...
1
vote
1answer
163 views

FTP SITE CHMOD Error

When trying to edit file/folder permissions via FTP I am getting the error: 505 Security server forbids SITE commands. Contact admin. I am currently using VSFTPD with the config value ...
0
votes
2answers
415 views

Undoing change of ownership to var directory

I accidently ran sudo chown -R user:user *.* (on Ubuntu 11.1) inside /var directory.. Even after running sudo chown -R root:root *.* (and rebooting) I keep getting GUI messages that some operations ...
0
votes
1answer
950 views

DocumentRoot is /srv/www/htdocs; how to enable ~/public_html?

I have installed a LAMP stack on my OpenSUSE 11.4 server. Currently, the DocumentRoot is set to /srv/www/htdocs but I want my users to be able to use ~/public_html just as they would in a shared ...
1
vote
1answer
242 views

How to chown when a user name contains a dash?

A user and group contains a dash: abc-def. When I try to use chown I get an error: chown abc-def.abc-def * -R chown: invalid user: `abc-def.abc-def' the user is valid and it should work... how can ...
2
votes
2answers
246 views

Make files editable for guests without using chmod

Sorry if this is the wrong place to post this, or if it has been posted before. I couldn't find anything though. If I log on to a linux server without supplying a username or password (from windows ...
2
votes
2answers
379 views

Determing the Execution Environment of Apache

I am having this error: [Mon Dec 05 10:22:23 2011] [warn] mod_rewrite: Running external rewrite maps without defining a RewriteLock is DANGEROUS! [Mon Dec 05 10:22:23 2011] [error] (13)Permission ...
2
votes
2answers
829 views

How to give ownership to root without being root ? (needed for Apache)

I've got a PHP script that creates a folder on my server. This folder is supposed to be accessed via Apache, and users can view it online. Now if I create this folder while being root, everything ...
0
votes
1answer
1k views

chown, chmod & bad settings on /home/user/.ssh directory in fresh install of CentOS 6

I just finished installing CentOS 6 last night (netinstall from georgia tech repository), and have been running into some weird SSH issues when I try to SSH from the CentOS box (behind my home ...
2
votes
3answers
919 views

Cross-group file permissions in Linux

I have 2 users: Alice and Bob and 2 groups: Management and Personnel. Alice has primary group Management, and secondary groups Personnel and Alice. Bob has primary group Personnel and secondary group ...
0
votes
1answer
219 views

CentOS Directory Owner

I have a dedicated CentOS 5.6 Server for our webhost. I've setup FTP account in PLESK to access our website. Once I migrated joomla over I can not change/modify or upload new files via: FTP. I've ...
0
votes
2answers
66 views

creating user with limited access

I add a user on Application server using "useradd" command. /usr/sbin/useradd shantanu This user can connect to mysql service using the following command... mysql -h 10.10.10.111 -uroot -proot@123 ...
3
votes
5answers
10k views

is it safe to chmod 775/664 with owner www-data:www-data?

To make working with my webserver easiest I am proposing doing something like the following: sudo chown www-data:www-data /var/www -R cd /var/www sudo find . -type f -exec chmod 664 {} \; sudo find . ...
2
votes
1answer
289 views

Setup Directory Permissions For Multiple Users To Read/Write

I am trying to figure out how to setup the permissions on a directory (/apps) so both the root user, and another user justin can read, and write into the directory. The user justin is part of the ...
1
vote
1answer
506 views

mysql.sock issue, chown mess and file permissions in LAMPP

I've made a mess on my server. I'm using LAMPP and I've created a new user apache:apache and assigned him to take care of the Apache. phpMyAdmin did not work due to that change so I had to chown the ...
2
votes
2answers
4k views

Limit sudo to only one directory and it's subdirectories by sudoers file

So I would like to limit Apache to only change permissions in a certain folder and all of it's sub-directories, so this is what I have in my sudoers file apache ALL= (ALL) NOPASSWD: /bin/chmod -R ...
0
votes
1answer
327 views

Pre/Post deploy script to change file ownership?

We are running CentOS 5.6 on a dedicated server. I am planning on deploying our Magento store changes using BeanstalkApp (www.beanstalkapp.com) which offers pre and post deploy hooks. My username for ...
1
vote
1answer
76 views

Change group owner of file, but not the owner

I want to make sure all directories and sub directories are of the group hgdata, but I do not want to change owner's (they are many different owners). The command chown -R will do the recursive ...
2
votes
4answers
459 views

Cannot login to Solaris due to chown on /usr directory

Someone ran "chown -R username /usr" and now I have no way of logging into the box to change it back. SSH has been disabled, X Server won't start so I have no graphical GUI, and the console login ...
1
vote
0answers
89 views

Cannot login to Solaris due to chown on /usr directory

Someone ran "chown -R username /usr" and now I have no way of logging into the box to change it back. SSH has been disabled, X Server won't start so I have no graphical GUI, and the console login ...
0
votes
2answers
75 views

User in group with r/w access does not actually get the read/write anything

I added my user to the www-data group. I chmodded a certain directory to 774 (-R, recursively) so only the owner and the group can change something. Yet my user can't even access it. What am I ...
2
votes
1answer
791 views

chown to a user I can sudo to

One of our users who has sudo privileges to multiple non-root users (role accounts for use with particular projects) would like to be able to change ownership of files among those users: e.g., if ...
0
votes
2answers
680 views

OSX chown problems after creating users with dscl

Alright, so I've made a user and a group using dscl as follows: dscl . -create /Users/deadline dscl . -create /Groups/deadline dscl . -append /Groups/deadline GroupMembership deadline Now I'm ...
1
vote
0answers
1k views

Lighttpd 403 Errors on HTML and PHP pages

I installed lighttpd on CentOS 5.5 64-bit. Everything seems fine and running except I cannot get past 403 errors on both HTML and PHP pages. I have used CHMOD and CHOWN, changed ownership in the ...
0
votes
2answers
2k views

Detect if Solaris has chown restricted

I am trying to chown a file, and I am getting a Not ownermessage bash-3.00$ uname -a SunOS host001 5.10 Generic_138888-03 sun4u sparc SUNW,SPARC-Enterprise bash-3.00$ id uid=60010(user1) gid=910(web) ...
3
votes
1answer
2k views

Only allow a user to CHMOD and CHOWN in their home directory or a specified directory

I have a Windows user on my network who has Samba access to our linux development server. Occasionally permissions or ownership will become confused for reasons unknown and he will no longer be able ...
0
votes
1answer
1k views

MySQL (local) owner and permissions

I asked this question on the MySQL forums and got no answer. I asked on StackOverflow and received a recommendation to try on ServerFault. So here I am. I recently successfully installed the 64 bit ...
2
votes
2answers
120 views

Unix Group Permissions

I have created a directory and chown to have permissions master:webmaster and chmod the folder to 775 hence group writeable. So why is it i bert as a member of webmaster cant mv the directory or ...
7
votes
2answers
28k views

chown on a mounted NFS partition gives “Operation not permitted”

I have a remote partition that i have mounted locally using NFS. 'mount' gives 192.168.3.1:/mnt/storage-pools/ on /pools type nfs (rw,addr=192.168.3.1) On the server i have in exports: ...
1
vote
3answers
1k views

chmod of 400,000 files inside multiple subdirectories?

Howdy... I'm looking to chmod 777 a whole bunch of files. Alternatively, since it's more secure, I could also settle for a chown www:www of these files to make them web accessible. Now, since I have ...
2
votes
1answer
437 views

How to use set-user-ID bit on directories?

I want all files in directory /home/alex/foo to be owned by alex, no matter who creates them. I'm trying this technique, but it doesn't work (on CentOS 5, under root): $ cd /home/alex $ mkdir foo $ ...
3
votes
2answers
4k views

root directory permissions changed to 777 by mistake whats now?

By Mistake on Ubuntu 9.04 my colleague has changed the permissions to 777 on root directory (/) whats the best way to recover the permissions ?
17
votes
2answers
1k views

Using dot (.) as delimiter to specify group in chown

I've always done: chown nimmylebby:admins file I see that this also works: chown nimmylebby.admins file Might seem like a silly question but I'm genuinely curious on how the latter works. It ...
1
vote
3answers
255 views

What is the purpose of executable file access rights in Linux?

I never understood this, because if you have access to read a file, doesn't that mean you would be able to copy it somewhere else, thus allowing you to execute it anyway? What am I missing?
1
vote
1answer
1k views

Used recursive chown on the root directory

Im gonna need some help restoring my ssh settings as i screwed everything up by calling this command: chown -R user / At the moment im not able to access the site through ssh/ftp since the ...
16
votes
5answers
27k views

How to Chown a directory recursively including hidden files or directories

Seems like chown with the recursive flag will not work on hidden directories or files. Is there any simple workaround for that?
0
votes
2answers
709 views

bulk swap uidNumber/gidNumber?

We currently have LDAP servers in Dev env. and staging/prod env. Both are not coupled and accounts are created manually. So the uids are same but the uidNumber and gidNumber are different across these ...
0
votes
3answers
174 views

What happens when a chown occurs on a file being written to?

Background: I have a cron job which chown's the directories of new users. More often than not, these users are already uploading files to the server before the job occurs. So will files successfully ...
3
votes
2answers
114 views

How can I reset the permissions of /bin /boot /etc and /dev to orignal owner, Ubuntu?

I accidentally changed the ownership of the /bin, /boot, /etc and /dev recursively to nobody:nogroup using chown when I misplaced a forward slash! How can I resort the original file ownerships? I've ...
0
votes
2answers
338 views

directory owner problem

I have a uploader using applet and jsp,so after it is uploaded the owner is tomcat so it is not accessible by php i mean apache. its throughs error.i changed chown in php and directly in shell access. ...
2
votes
2answers
867 views

Apache security for multi-user development web server

I've been searching and reading through documents all morning and understand that I need to use some combination of chown and probably 'jailing' to securely give programmers access to directories on ...
3
votes
2answers
743 views

www-data ownership makes the WordPress installation consume more memory

I have a WordPress installation. When the ownership of the folder is root, the memory consumed is okay. However, when I change the ownership to the www-data user, it starts consuming a lot of memory ...
1
vote
4answers
704 views

Chown root mistake

I accidentally executed the chown userx:userx / command. Is there a way to fix this in a gentle way? I know the mysql folder has to be owned by mysql:mysql. But what about the other folders? Are ...
1
vote
3answers
579 views

Joe's sad PHP permission problem (LAMP) [closed]

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 ...
0
votes
1answer
2k views

CentOS 5.4 NFS v4 client file permissions differ from original files & NFS Share file contents

Having a strange problem with NFS share and file permissions on the 1 out of the 2 NFS clients, web1 has file permissions issues but web2 is fine. web1 and web2 are load balanced web servers. So ...