I'm creating directories and changing the permissions of them in perl with the following code:
umask 0000;
mkdir $path, 0770;
chown $userid, $groupid, $path;
Now when I do ls -l on a directory I've just created, they are as follows:
drwxrws--- 2 user group 4096 Nov 3 15:34 test1
I notice for the group permissions, there's an s instead of x.
Even if I chmod manually to remove all permission
I'm using Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-31-virtual x86_64) and changed the permissions of the "etc" directory to 444 (sudo chmod 444 etc).
I use for example to change everyone's permissions:
chmod 777 file
Now, what if I want to preserve the current permissions?
I know there's something like
chmod xx7 file
in case I'd only want to change the world permissions, but I can't work it out (forgot).
Thanks!
I have many file permission problems, as being a newbie, I unfortunately set permissions on everything somehow to 777 (chmod -R 777 /). I believe I've done this from the root directory logged in as the root and now can't really do much at all but log in as another user.
I need to mainly change the ssh permissions, but obviously can't because it won't let me log in as the root user.
I want to chmod a directory.
I execute chmod -R nnnn Directory and after checking permissions with ls -l they are still the same. The user I'm working with is already within the truecrypt group.
What am i doing wrong?
I'm running a duel boot/partition machine with Ubuntu 12.04 and Windows 7. On Ubuntu OS, I wanted to change the permissions in one of my directories so could extract files into that directory. In the terminal I entered chmod -R 777 /usr/share/icons which gives the owner, group, global read, write, and execute permissions.
I've read a little about chmod and have a high-level understanding of file permissions. But I'm a little confused about the concept of an 'owner'.
If my user account is the 'Owner' of a directory but it has no permissions (chmod 0000) does my user have any more ability to do anything than another random user on the system? Assuming neither user is a super user?
Under what circumstances will chmod fail?
I looked at the man page but it only specifies usage and doesn't go into details about what circumstances it won't work in.
I'd assume chmod will work if:
you're root
you own the target file (and are setting a mundane mode bit i.e. not sticky bit, others)
Can users use chmod to change permissions on a file they have group access for?
I'm using Thunderbird for email with the addressbooksynchronizer addon. The book share is to a network drive and works almost well.
I've revisited the chmod references and again found out how to "sticky" the Group on folder and it's files and it works great. What is vexing me though is that whichever user the WRITES the addressbook sync file changes the permissions to only User RW.