Tag Info

Hot answers tagged

5

This looks like an NFS issue. Is NFS involved? NFS servers running on Debian-based systems, and possibly others, are configured to ignore supplementary groups unless told specifically otherwise. Ensure that --manage-gids has been supplied to the rpc.mountd program. On Debian systems that is done by editing /etc/default/nfs-kernel-server and ensuring that ...


4

To get the octal permission notation. stat -c "%a" file 644 See the manpage of stat, -c specifies the format and %a prints the permissions in octal. Or for multiple files and folders: stat -c "%a %n" * 755 dir 644 file1 600 file2


4

From man chown -R, --recursive change files and directories recursively


3

65534 is some kind of default/nobody UID & GID value. Your VPS provider made some sort of mistake when they copied over your container. For example they used rsync but failed to use its --numeric-ids option. The user IDs inside your container don't exist outside the container and some copy tools, upon seeing UIDs and GIDs that they can't resolve, revert ...


3

In UNIX, only root can change the owner of files. As a consequence, we can conclude that the owner of the file is not changing when you edit it. Instead what must be happening is that your editor is writing out the edited contents into a new file and replacing the old file with the new one. Because it is a brand new file, the file ends up being tagged with ...


3

I trust that you’re familiar with the basic -rwxrwxrwx notation.  You probably know that set-user-ID gets you -rwsrwxrwx and set-group-ID gets you -rwxrwsrwx.  But, without further clarification, these forms are ambiguous.  If you see -rws------, you might assume that the mode is 04700 (set-user-ID + user read + write + execute), but how do you know that the ...


3

You could use a script for your own user-defined cp command that checks file extensions and uses chmod appropriately... You could do something simple like: (using install rather than cp chmod as per @fd0. That's smarter anyway.) #!/bin/bash args=("$@") dest="${args[@]:(-1)}" unset args[${#args[@]}-1] if [ ! -d "$dest" ]; then echo "Please specify a ...


2

I had a similar problem when using rsync to backup my system to my server. I used: rsync -aAXSHPr \ -e ssh \ --rsync-path="sudo /usr/bin/rsync/" \ --numeric-ids \ --delete \ --progress \ --exclude-from="/path/to/file/that/lists/excluded/folders.txt" \ --include-from="/path/to/file/that/lists/included/folders.txt" \ / ...


2

Setting the hostname in linux is done via the sethostname(2) syscall. And /bin/hostname is a bare wrapper around this syscall (and a few related syscalls). /etc/hostname is supposed to be read during the boot process by some script, who subsequently runs /bin/hostname to complish its job. CAP_SYS_ADMIN is one of linux capabilities(7), allows a thread to ...


2

You can do this with the commands from the acl package (which should be available on all mainstream distributions, but might not be part of the base installation). They back up and restore ACL when ACL are present, but they also work for basic permissions even on systems that don't support ACL. To back up permissions in the current directory and its ...


2

Assuming that FollowSymLinks is set correctly set, I suppose that the problem is that your home directory does not allow anyone else to traverse into it (Do the parent directory's permissions matter when accessing a subdirectory?). That's the default on Fedora; it looks like the default on Ubuntu is more permissive, which is why switching to that worked. ...


2

Verify symlinks are enabled inside apache itself. Apache doesn't necessarily allow for symlink redirection, even when permissions are fine. <Directory /var/www/myapp> Options +FollowSymLinks AllowOverride All ... </Directory>


2

Deleting a file requires write permissions to the file's parent directory. The same permissions you would need to have to be able to create files in the directory in the first place, so your requirements are conflicting: removing write permission to the user's homes to prevent deletion also prevents creation of files. Note that file creation and file ...


2

Simplify your situation: This is not a VMware install problem, it's a "Why doesn't the system recognize /usr/bin/perl?" problem. Once that's fixed, you should be able to install VMware... at least, you've overcome the first hurdle. So, try: /usr/bin/perl -e 'print "Hello, world\n";' and see what you get. This will be your first clue into the underlying ...


2

Use the file permission groups for your users. Request from your admin to establish a new group in /etc/groups, add all the team users to that group. Change the umask definitions in the user's shell profile to allow the access for members of the same group.


2

This may not be best practice but I typically create a new group for the site, add the users to the group including the web server daemon user (apache in my case), change the permissions on the site dir and then set the group sticky bit. Example: Site dir: /var/www/site1 # groupadd site1 # useradd -G site1 user1 # useradd -G site1 user2 # useradd -G site1 ...


2

Here the answers: root has always full access to files and directories. The owner of the file usually has them too, but this is not always true. For example: -r-xr----- 1 user1 users 199 Oct 14 18:42 otherfile.bin user1 is the owner; however he can only read and execute, but root still has full access (rwx) to the file. RUID is the Real User ID and it ...


2

There are two possibilities: 1) You need to look at the owner/group permissions of the directory containing the file or directory you try to delete as that entry will be modified if a file (or directory) within it is deleted. 2) The account (group membership) of user xyz is modified but the user is not using a new shell and therefore the new group ...


2

I would use the install tool to copy from NTFS. install -m644 file1 ... fileN destination_directory


1

Yes, some editors will basically delete the old file with the new edited file. Thus the owner is the one that made the edit and the group would be your primary group. However, you enforce the group on files under the directory by changing the directory permissions using chmod g+s . .... this will cause any newly created file to be in the same group as ...


1

In short, you have to have permission to read the files on the source server before you can read them on the destination server. If you don't have an account on the source server with the same UID as on the destination, it will be very difficult at best to read these files. If you have root permissions on the destination and the mount is exported with the ...


1

Simply use chown with --dereference as described by chown(1). So in your case: chown --dereference -R cpm210:cpm210 /var/www/cpm210/public_html/ also the wildcard at the end was unnecessary since you use -R. The opposite would be --no-dereference (short -h), btw.


1

How B can access this directory? Well, the directory belongs to A, and A did not grant any permissions on this directory to B. Therefore B cannot access the directory. It's that simple. If A (or root) wants to grant permissions to B then they should do so with chmod (or chown if root does it).


1

Try this: for file in $(find .); do perm=$(stat -c "%a" ${file}); echo chmod ${perm:0:1}${perm:0:1}${perm:2:1} ${file}; done Remember to remove echo


1

On a (recent for sed's -z) GNU system, you could do something like: find . ! -type l -printf '%m:%p\0' | sed -Ez '/^.?(.)\1.:/d;s/(.)(.)(.):/\1\1\2\x0/' | xargs -r0n2 echo chmod (remove echo when satisfied with the result). Note that it only addresses the r, w, x bits not the special ones. If you don't want it recursive: find . -mindepth 1 ...


1

In cygwin its not possible to change group permissions, until the group is Users or Root. Refer http://stackoverflow.com/questions/17091972/chmod-cannot-change-group-permission-on-cygwin So you wont be able to change the group permission until you change var's group owner to Users So the best solution is: chown :Users /var chmod 757 /var chmod ug-s /var ...


1

The problem is in this line: data=cat $PWD/.git/config This temporarily sets the shell variable data to have the value cat and then attempts to execute the file $PWD/.git/config. That is unfortunate because you probably didn't want to execute it. You likely intended: data=$(cat $PWD/.git/config | awk '{for(i=1;i<NF;i++)if($i~"merge")print$(i+2)}') ...


1

This can be set with command chattr in linux. chattr is the command in the Linux operating system that allows a user to set certain attributes on a file residing on a Linux file systems. It is also called as immutable bit. There are so many attributes present which can be applied on files in Linux. In above question, S and I are some of the attributes. ...


1

Some options: sudo -i, that's the most obvious alternative. sudo -l then look for a command that you are allowed to use that you could use to solve the problem, like : editing a file executed by root, like crontab, logrotate, executon yum/rpm... go to the console, and connect as root (only ssh is restricted if I understood) open a graphical session, some ...


1

The question implies SSH (or equivalent) as the only access. The only way generally to get from a user privileged process to a root privileged is via su, sudo, or another site local alternative. If you don't have one then you are hopefully out of luck as the presence of an alternative suggests a security hole of some sort. That said, the suggestion of ...



Only top voted, non community-wiki answers of a minimum length are eligible