I have installed opencart 1.5.6.1 on Digital ocean ubuntu14.04 I have used "demo" as username and login by tightvnc  opencart requird "www-data" as owner and group:  $ sudo chown -R www-data:www-data /var/www/html   $ sudo chmod -R a=r,a+X,u+w /var/www/html $ cd /var/www/html/  $ ls -la   drwxr-xr-x+  6 www-data www-data  4096 Aug 17 07:19 catalog -rw-r--r--+  1 www-data www-data     0 Aug 15 13:14 config-dist.php $ sudo getfacl /var/www/html/ # file: var/www/html/ # owner: www-data # group: www-data user::rwx group::r-x other::r-x     Then I change the ACL by adding demo as owner as well:  $ sudo setfacl -R -m u:demo:rwx /var/www/html/ # file: var/www/html/ # owner: www-data # group: www-data user::rwx user:demo:rwx group::r-x mask::rwx other::r-x   which allowed demo the edit the files and folders in vnc.  but this has also changed the permission of those files:  $ ls -la drwxrwxr-x+  6 www-data www-data  4096 Aug 17 07:19 catalog -rw-rwxr--+  1 www-data www-data     0 Aug 15 13:14 config-dist.php   the group has been chhanged to rwx....  If I change the group permission by:  $ sudo chmod -R g-x /var/www/html   The ACL mask changed....  # file: var/www/html/ # owner: www-data # group: www-data user::rwx user:demo:rwx                   #effective:rw- group::r-x                      #effective:r-- mask::rw- other::r-x   If I change the mask:  $ sudo setfacl -R -m m:rwx /var/www/html/   the group returned to rwx!  So the question is: Whenever I changed using chmod, ACL changed! When I changed using ACL, group permission changed!  It may be related to :   may need to use -n  sudo setfacl -nR -m u:demo:rwx /var/www/html/  may be" The group class permission bits that would be displayed by ls -dl mydir now correspond to the mask entry."  which mean the rwx displayed is referred to the mask permission instead of the group permission
123578
To backup the "/home" directory tree of a server, I've created a 'backup' account and used setfacl to make the whole directory readable by it. My cron job runs this command as root each night:  setfacl -R -m u:backup:rx,d:u:backup:rx /home   Great, except for one problem: whenever I run this command, it changes the group permissions of my ssh key.  me@myserver:~/.ssh$ ls /home/me/.ssh/id_rsa -l -rw-r-x---+ 1 me me 1679 Jan  8 18:35 /home/me/.ssh/id_rsa   Well, this causes my ssh program to barf because it is now group readable. Strangely, getfacl disagrees with the permissions.  me@myserver:~/.ssh$ getfacl /home/me/.ssh/id_rsa getfacl: Removing leading '/' from absolute path names # file: home/me/.ssh/id_rsa # owner: me # group: me user::r-- user:backup:r-x group::--- mask::r-x other::---   getfacl thinks the file is not group readable. If I run the obvious command  chmod 400 id_rsa   the permission is fixed, but reverts every time I re-run the original command (setfacl -R -m u:backup:rx,d:u:backup:rx /home). What's going on?  Note: I do want my id_rsa to backup up, so let's not worry about those security implications.
58188
I entered chmod -R 777 /usr/bin and now sudo is not working.  It says sudo must be setuid root.  Some advice online said to run chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo.  On entering chown root:root /usr/bin/sudo it shows an opened in readonly mode error.
122141
I having a weird problem on my VPS with Ubuntu 14.04 as the server. I tried creating a directory with php mkdir using the code below  &lt;?php      mkdir("/items/foldername", 0777, true); ?&gt;   Whenever i run this script,the folder gets created but with 755 permission instead of 777.  I have tried all available options I can see none is working. My php script is using www-data.   I have tried the following   sudo chmod -R 777 items  sudo chmod -R g+s items I added www-data to the root group
48463
I'm using the Arduino IDE in Ubuntu, and am having issues with the serial port. It has worked in the past, but for reasons that may be unnecesary, I felt the need to change the ownership of some of the files from root ownership to my users ownership.  This made the IDE work correctly, but I lost the ability to use the correct serial port.  In the dev folder, the port I need is listed as permission 166. Someone (who is no longer in the area to help me) swapped the permissions to 666, which made it all work gloriously.  However, it reverted back as soon as I restarted my computer, and if I now try to use the command:  sudo chmod 666 ttyACM0   nothing happens. No error messages, but no permission change either.    How can I change it, and how can I get it to change permanently.  I apologize if this question is overly simplistic or unclear, I'm an ubuntu noob, and I wouldn't begrudge feedback!
65554
It doesn't seem that many others have had this problem so I thought I'd ask here.  Have a server running Ubuntu with 1 internal and 1 external drive. Have a folder shared with samba on the internal drive that can be accessed, however, when sharing the entire external or just a folder on it I get the "You do not have permission to access" error on the Windows clients.   When sharing on Ubuntu I go to properties, share and then tick share, allow others to write as well as guest access. Clicking create share then says it will have to set the permissions and I let it. It's not accessible. When trying to set permissions manually in the Permissions tab it doesn't let me choose anything, when choosing Read and Write for "other" users it reverts back to nothing as soon as it's chosen.  I've tried creating a symlink from the mount point to within the home directory and sharing that, even getting chmod to change the permissions so they're viewable in ls -la, but it still isn't accessible. Is there something really simple I'm missing here like externals not being easily shared? Thinking I might have to crack it open and stuff it inside the server. Oh and the external is NTFS, if that would make a difference.
81393
Suppose I installed ubuntu with the user usr1 then I added usr2. I then create a group grp1 where this 2 users are added. A folder is owned by usr1 and has group grp1. But when I login as usr2 I cannot write. The folder has permissions 755...  usr2@kmserver:/media/data/www$ groups usr1 usr1 : grp1 ... usr2@kmserver:/media/data/www$ groups usr2 usr2 : grp1 ... usr2@kmserver:/media/data$ ls -l total 20 drwx------ 2 root root 16384 2011-05-12 10:53 lost+found drwxrwxr-x 2 grp1   grp1    4096 2011-05-12 15:15 www   Whats wrong?
1363
sorry fresh user. I installed about 9 days ago and had issues with Unity disappearing which took 5 days of headaches to fix. It never did fix, I reinstalled.   I set up Plex (media server) and while the server is running and can be accessed by external network devices, I can't add files. Plex says this is because of permissions. I have gone up and down the forums here and at Plex to get an answer. It seems everyone says   chmod -R 755 /media/My\ Book/Videos   will change permissions to allow the folder "Videos" on my external USB 2.0 NTFS 3TB Western Digital drive (which is mounted and accessible through the file manager) as well as every sub-directory and file contained therein to be accessible to user "Plex".  I have used file manager and as soon as you click to change permissions it changes right back. When I chmod with -c it tells me every file is changed (usually 600) to 755 as I commanded it to do. I did   ls -l   to verify and there is no change. (I also used ls -l to make sure I knew who the owner was and it is me (mvl1014). ls -al gives me the same info.)  I swear to god I tried to sudo it and after smashing my head against this keyboard for basically the entirety of my day, I tried it as root. I was scared shi-less but couldn't come up with anything else. sudo su to root and then chmod -R -c /media/My\ Book/Videos  Same result. -c told me every single file was changed and a check in Unity or in terminal confirmed not a darn thing changed.  Now it seems to me that even if that isn't the thing stopping Plex from working there is still a problem with this command not going through.  12.04LTS -- on gen 1 i7 (2.7 GHz I believe) with 6 GB ram   I've attempted to attach a screenshot but I'm told I need 10 reps to do so, which means I'm copy/pasting too.  Please excuse my obfuscation, but Lorem Ipsum seemed unnecessary. And I tried multiple ways to format this but it looks perfect every way and messed up each time in the preview below. (Ugh, I'm a mess.)  $ chmod -R -c 755 /media/My\ Book/Videos  .....  .....  .....  mode of `/media/My Book/Videos/xxxx/xxxx/xxxx.mkv' changed from 0600 (rw-------) to 0755 (rwxr-xr-x)    ls -al shows:  mvl1014@FX6800:/media/My Book/Videos$ ls -al   total 88  drwx------ 1 mvl1014 mvl1014     0 Aug 28 15:17 .   drwx------ 1 mvl1014 mvl1014 20480 Sep  3 14:29 ..  drwx------ 1 mvl1014 mvl1014  8192 Aug 28 15:18 xxxx drwx------ 1 mvl1014 mvl1014 49152 Aug 16 14:02 xxxx drwx------ 1 mvl1014 mvl1014  8192 Aug 27 21:36 xxxx drwx------ 1 mvl1014 mvl1014  4096 Jul 23 19:09 xxxx   I apologize if this has been asked. I looked through this place plus at all the suggested "Similar Questions". The closet thing I got to an answer , but running the provided code with my own UID didn't work either.
21886
I wanted to change permissions on my external drives that are automounted however I have tried by sudo nautilus and then going to gui and permissions and changing it however it does not let me.  I ran the ls -l and get  drwx------ 1 xbmc xbmc   the gui shows below.  owner xbmc folder access create and delete files file access ---  Group xbmc folder access none file access ---  others folder access none file access ---   how can I change it so that everyone has permission to access the drive and ALL folders/files inside of it. I am trying to get plexmedia server running and I cant see my drives via the webpage manage to add it to my source to be able to stream my content.  I want to change the "others" access so that I can access all my drives on the /media path to get read and write for all my folders from anywhere.  you can see my drives that are mounted here (external drives are #18,19,20)
16810
I would like the user to have full rights on this folder (as well as all sub-directories and files in it):  ~/.blabla   currently owned by root.  I have found numerous posts (in this forum and elsewhere) on how to do this for files but I can't find a way to do it for whole folders.
89671
I have a shell script called boot.sh on an Ngnix server  I am trying to call it via PHP, but I don't think I have permissions.   How can I give www-data permission to run boot.sh - and only boot.sh  When trying sudo chown or sudo chgrp I am getting Operation Not Permitted
109342
Redhat Enterprise Linux 5.10 (No we can't upgrade, please don't ask.)  I have a user, 'tina' who is logged into the system. I need her and user 'lu' to use chmod, chgrp, and chown commands for certain reasons (no they don't know enough to be a security risk, we have daily backups anyway). At first I used sudo nedit /etc/sudoers to edit the file. Whereon I added this line:   tina,lu ALL=/bin/chmod /bin/chown /bin/chgrp   Then I found I have to use the visudo command, which I did, and I saved the file without edits.  So I went to test her use of chgrp and I got an error like "Does not have permission to use this command".    If I change sudoers do the users need to log off unix shell windows and logon again? The man pages didn't say nor did any pages on Google.  Do I have to restart the server?
11122
I'm trying to recursively chown a VirtualBox shared folder, but I can't get it to work:  $ ls -lah total 16K drwxr-xr-x  4 root root   4.0K Aug  1  2012 . drwxr-xr-x 23 root root   4.0K Jul 21  2012 .. drwxrwx---  1 root vboxsf 4.0K May  4 17:02 sf_dev drwxrwx---  1 root vboxsf 4.0K Sep  2 10:21 sf_dropbox $ sudo chown -R pknight:pknight sf_dropbox &amp;&amp; ls -lah total 16K drwxr-xr-x  4 root root   4.0K Aug  1  2012 . drwxr-xr-x 23 root root   4.0K Jul 21  2012 .. drwxrwx---  1 root vboxsf 4.0K May  4 17:02 sf_dev drwxrwx---  1 root vboxsf 4.0K Sep  2 10:21 sf_dropbox   I'm aware that I could just add a user to the vboxsf group (as it has full permissions), but I don't want to give every user/daemon full permissions to all of my shared folders.  I'm running VirtualBox 4.2.x, with Windows 7 as the host and both Xubuntu and Debian as guests.  Is there any way for me to change the owner/group of my VirtualBox shared directory?
116885
I'm new at Linux and I just download Ubuntu 12.04 LTS.  I found a spot that showed me how join my Windows Active Directory.  It has me add couple lines into the 'hosts' but I'm not able to edit the file because I do not have the permission.  I'm not the owner.  I use chmod with it rwx and still it will not let edit the file.  How do you change the permission?  Thanks
110200
I'm logged in as minime.  I don't understand why it doesn't allow me to chown file that I own without su privileges. Obviously I can use sudo, but I'd like to understand why? because of www-data group?  chown minime:www-data user-functions.php  ls -lh  -rw-r--r--  1 minime minime    24K Jan  6 16:11 user-functions.php  Error:  chown: changing ownership of `user-functions.php': Operation not permitted
120747
I am using 13.04 trying to edit or drag and drop files but since all the folders are owned by root and assigned to the group "root" I am not allow to do this.  I added my current username to the "root" group and still I am not able to edit.  I don't want to have to login as root to do this, or change all the folders group to something else.  What are my options.
21079
I've never really got how chmod worked up until today. I followed a tutorial that explained a big deal to me.   For example, I've read that you've got three different permission groups:   owner (u) group (g) everyone (o)   Based on these three groups, I now know that:   If the file is owned by the user, the user permissions determine the access. If the group of the file is the same as the user's group, the group permission determine the access. If the user is not the file owner, and is not in the group, then the other permission is used.   I've also learned that you've got the following permissions:   read (r) write (w) execute (x)   I created a directory to test my newly acquired knowledge:  mkdir test   Then I did some tests:  chmod u+rwx test/ # drwx------ chmod g+rx test/ # drwxr-x--- chmod u-x test/ # drw-r-x---   After fooling around for some time I think I finally got the hang of chmod and the way you set permission using this command.    But...  I still have a few questions:   What does the d at the start stand for? What's the name and use of the containing slot and what other values can it hold? How can I set and unset it? What is the value for this d? (As you only have 7=4+2+1 7=4+2+1 7=4+2+1) Why do people sometimes use 0777 instead of 777 to set their permissions?   But as I shouldn't be asking multiple questions, I'll try to ask it in one question.  In UNIX based system such as all Linux distributions, concerning the permissions, what does the first part (d) stand for and what's the use for this part of the permissions?
1560
Why is the chown command root-only? Why can't non-root users use chown to give away files they own?