Tag Info

Hot answers tagged

6

If you change the file owner using chown, the permissions for alice would be transferred to bob. So here's the flow: sudo mv ~bob/Documents ~bob/Documents.orig sudo mv ~alice/Documents/ ~bob/Documents sudo chown -PR bob ~bob/Documents Edit: In case you want to overwrite the group as well, use sudo chown -PR bob:bob ~bob/Documents Or: sudo chown -PR ...


4

As Bob: mv ~bob/Documents ~bob/Documents.orig cp --remove-destination --no-preserve=ownership -r ~alice/Documents/ ~bob/ sudo rm -fr ~alice/Documents/


4

I guess this is not possible with standard Linux technology. You need RichACLs to configure precisely that. If the side effects are not a problem then you can remove write permissions from the parent directory. OK, I have to correct my first thought: There is a work-around with standard features. You can move that directory to a different path, create an ...


3

The passwd utility is installed setuid, which means that when it runs, it runs as the user that owns the file, not as the user that called it. In this case, passwd belongs to root, so the setuid bit causes the program to run with root privileges. It is therefore able to make changes to the passwd and shadow files. If you look at the permissions for the ...


2

One option that could work is setting up a chroot with a minimal installation of your system. In Debian and Ubuntu, this can be accomplished with debootstrap. In FreeBSD, this is accomplished more thoroughly through jails (I won't reference jails specifically other than here). Once you have this step completed, start an sshd on a different port in the ...


2

If your user is going to SSH to the system, it's a little bit difficult. If they will be using an SFTP client you could setup a chroot jail. This will allow you to set the ChrootDirectory to the folder you are referencing.


2

Refer to the answer here. Basically, rootness trumps permissions. Permissions 000 means only root can read or write the file. I'm not aware of any extra special use for the combination of root ownership and 000 permissions. Also, you could find some worthy information from this question as well. So, as user Hauke Laging points out in his ...


2

Programs that run set-uid or set-gid should, and normally do, switch back to the original uid/gid when they're opening files named by the user. They only use the privileges of their set-[ug]id permissions to access the special files that they need for their operation; for instance, wall only uses it so that it can open the recipient's terminal. Using the ...


2

First command gives rights to davis on the directory itself, the second one sets the default ACL entry for new files that get created. The last one sets all files and directories to give davis rwx access. TBH if you're going to do the last command, the first one seems a little redundant since recursive setfacl's also hit the directory you give it.


2

The personal data in /etc/passwd is user names, office locations and phone numbers. That's the 1970s version of the company phonebook. When Unix was designed, it was expected that people who have an account on the same machine would be members of the same organization (colleagues, fellow students, etc.). If you don't want your users to have access to that ...


2

I would have to agree. /etc/passwd has not contained very sensitive data for a while now. I believe /etc/shadow is where lots of data that needs to be protected should be stored.


2

cp -avv /home/alice/Documents/ /home/bob/newDocuments/ && chown -Rvv bob:bob /home/bob/newDocuments/


2

There are at least a couple of ways to solve this issue. But first let me try and explain how the Linux/Unix world of permissions corresponds to the Windows world. windows has inheritable permissions; Linux systems traditionally don't (but can with ACLs, which I'll ignore for now). Linux permissions are split in to three: owner, group, and everyone else ...


2

If a Linux filesystem (not e.g. FAT32, NTFS) is mounted then the directory permissions for the root directory are taken from the filesystem. root must either change the owner (chown) or permissions (chmod, setfacl) of the root directory or has to create subdirectories which are writable by the users. The latter is what happens with the normal root volume: ...


2

The owner/group being set to 0 0 implies it's owner and group is root. Whether you can see inside it depends on the permissions of the last 3 letters of the permissions string. Type: ls -ld <dirname>. You should see something like: drwxr-xr-x 32 root root 4096 Jul 19 2013 <dirname> If the last character is - (not x) then you have no access to ...


1

You are confusing the generic option user with the filesystem specific option uid. from fstab(5) user allow a user to mount and from mount(8) uid=value and gid=value Set the owner and group of all files. (Default: the uid and gid of the current process.) which applies to the msdos, umsdos and vfat filesystems. you can do similar options ...


1

tl;dr: root:root rwxr-xr-x, unless you need write access to the directory, in which case root:www-data rwxrwxr-x, unless you need to protect secrets (e.g. database passwords) in the web directory, in which case root:www-data rwxr-x---, unless you need write access and you need to protect secrets, in which case root:www-data rwxrwx---. Yes, ideally, your ...


1

If bob has no permission to read alice's home folder you should do some operations as super user (if Bob has no already that power) I personally will use something like this: sudo rsync -a --progress /home/alice/Documents/ /home/bob/Documents/ sudo chown -Rv bob:bob_group /home/bob/Documents sudo rm -rv /home/alice/Documents rsync is very versatile you ...


1

Update I came across this post, see if this helps: http://serverfault.com/questions/228396/how-to-setup-sshs-umask-for-all-type-of-connections Add these lines to: /etc/pam.d/sshd # Setting UMASK for all ssh based connections (ssh, sftp, scp) session optional pam_umask.so umask=0027 You might also need to add them to: /etc/pam.d/login Edit: ...


1

There are multiple newer ways to store this kind of data, including but not limited to LDAP and NIS. The question you have to ask is why there's private information in /etc/passwd in the first place.


1

Use chmod g+s public_html to make new files created in the directory inherit the group of the directory. You don't need ACLs to achieve that, although you may want to use them for other reasons. Strictly, this behaviour is filesystem- and platform-specific, but it works under Linux for common filesystems. It is commonly supported elsewhere too.


1

Adding local_umask=022 to vsftpd.conf seems to have fixed the problem.


1

I think the better option (compared to running Pulseaudio systemwide) is to set a configuration location outside the NFS mount. The Pulseaudio manpage explains two possibilities: If a ~/.pulse/client.conf is not found, the global /etc/pulse/client.conf is used (and other config files in the same directories). To use the global settings, simply delete the ...


1

Sounds like you are getting confused between the pi user and the pi group. You cannot add a group to a group, only users. There is a group with the same name as a user, the groups the user is in have no effect on the users that are in the group.


1

Since nginx doesn't run php directly, but instead forwards requests to a php application, you care what the php binary is running as. I'm assuming you're running php-fpm, but the general idea isn't specific to php-fpm. The configuration page for php-fpm shows the directives that can be set. We're interested in the user and group params, as they control what ...



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