Questions tagged [permissions]

Permissions are the Unix way of controlling access to resources such as files, directories and devices and may be specified for an owner, group, or all users.

Filter by
Sorted by
Tagged with
12
votes
1answer
2k views

Permission bits not being enforced on samba share

I have a problem where permission bits are not being enforced on a samba share using a Linux client. I have samba configured on the server to force a certain user, group and permission bits and this ...
11
votes
3answers
2k views

How to copy a directory which root can't access to a directory that only root can access?

I have a directory on an nfs mount, which on the server is at /home/myname/.rubies Root cannot access this directory: [mitchell.usher@server ~]$ stat /home/mitchell.usher/.rubies File: `/home/...
11
votes
2answers
3k views

How to maintain the ownership of a file after editing?

My question is similar to this other one, excepted that one asks about newly created files. In my Unix box, users alice, bob and tomcat are in the group tomcat. The configuration files of the Tomcat ...
11
votes
4answers
3k views

sudo permission denied but su grants permission

this is the first occurrence where su was required for me. I read an article about changing the value in /sys/devices/virtual/backlight/acpi_video0/brightness to alter my laptop's screen brightness. ...
11
votes
4answers
44k views

su: Permission denied despite correct password

In my new Gentoo installation, su doesn't work as my non-root user: After entering the correct password I get the message "su: Permission denied". What could be causing this? I have already tried ...
11
votes
4answers
42k views

Setting default username and group for files in directory

Using this helpful post I am able to set a default group and file permissions in a folder. I'm having trouble setting a default owner (teamlead uid 1234). setfacl -d -m g::rwx /my/test/folder ...
11
votes
4answers
31k views

File permission execute only

How can I set file to be executable only to other users but not readable/writable, the reason for this I'm executing something with my username but I don't want to give out the password. I tried : ...
11
votes
2answers
38k views

-bash: cd: .ssh/: Permission denied

When I type in cd .ssh in terminal, it returns with -bash: cd: .ssh/: Permission denied. Now I cannot add my ssh keys to ssh. When I type ssh-add ~/.ssh/idname it says /Users/Dan/.ssh/idname: ...
11
votes
2answers
61k views

How to give user root permissions?

I just installed Arch. Works great. I created a new user, logged in with it and now I'm trying to install several thing with pacman. But I keep getting the error: error: you cannot perform this ...
11
votes
2answers
1k views

How do I grant different permissions for each user?

So, I've been using Linux for a few years now, and I really should know this answer, but I'm having trouble finding it. Specifically I've been using Debian based distro's....mostly Ubuntu. If I have ...
11
votes
2answers
2k views

Can I make a file only accessible to a script, and not a user?

I have a user with limited access on the system (that is, he is not a sudoer); let's call him Bob. I have a script or a binary which I, the system administrator, trust, and would have no problems ...
11
votes
1answer
3k views

What is the difference between 'ls' and 'ls -l' when I don't have execute permission on that directory?

I created a directory called folder and took away execute permission. $ mkdir folder $ touch folder/innerFile $ mkdir folder/innerFolder $ chmod -x folder Now if I do $ ls folder it outputs a list ...
11
votes
6answers
85k views

What are the settings to correct vsftpd “500 OOPS: cannot change directory” error?

My question is what settings do I need to change and/or commands to run to allow me to log into my vsftpd system? I am getting this error, when I login using ftp instead of sftp: Name (localhost:...
11
votes
2answers
33k views

wireshark: Couldn't run /usr/sbin/dumpcap in child process [duplicate]

Possible Duplicate: How to add write permissions for a group? When I run Wireshark, It shows the following message: Couldn't run /usr/sbin/dumpcap in child process: Permission denied Are you a ...
11
votes
5answers
8k views

Directory with +x permission, parents without it. When would this be useful?

Say I have a folder called folder in the following path: my_path = /a/b/c/d/e/folder and a file called file in that folder. Then, say I run this command to remove group permissions under /a/ > ...
11
votes
3answers
12k views

How do Linux permissions work when a process is running as a specific group?

This is something I haven't been able to find much info on so any help would be appreciated. My understanding is thus. Take the following file: -rw-r----- 1 root adm 69524 May 21 17:31 ...
11
votes
2answers
19k views

What is a regular file?

$ rm foobar rm: remove regular file `foobar'? What does it mean for a file to be "regular" and why does rm treat such a file as a special case?
11
votes
2answers
20k views

What's the idea behind rm not removing non-writable file by default?

What's the idea behind rm not removing non-writable file by default? Every time you want to remove a file that is non-writable file for current user but you have a write permission on directory get ...
11
votes
2answers
15k views

Group member cannot write even with write permission

The logged in user is a member of a group that has a write permission on a folder. But when this user is trying to write something, "permission is denied". The log below summarizes the question: ...
11
votes
2answers
12k views

Difference between chmod vs ACL

I understand chmod and chown and how the permission bits work, but there is another permission system inside Linux, ACL with setfacl and getfacl, so this makes me wonder. What's the difference ...
11
votes
2answers
2k views

Why do Linux/POSIX have lchown but not lchmod?

It seems that Linux supports changing the owner of a symbolic link (i.e. lchown) but changing the mode/permission of a symbolic link (i.e. lchmod) is not supported. As far as I can see this is in ...
11
votes
3answers
8k views

Restrict file access to append only

I have a directory with log files and I'm putting logs from script launched by users into them. Logging with syslog doesn't seem possible in this case. (non-daemon rsync) I want the users to have ...
11
votes
2answers
3k views

How can I change the permissions in /sys to alter the state of a LED/light using `udev`?

I've got a Thinkpad and would like to use the ThinkLight (the white flash light above the screen designed to light up the keyboard) for notifications on incoming Jabber messages. It is easy to ...
11
votes
2answers
12k views

Is there a way to prevent git from changing permissions and ownership on pull?

Every time I do git pull or git reset, git resets changes to permissions and ownership I made. See for yourself: #!/usr/bin/env bash rm -rf 1 2 mkdir 1 cd 1 git init echo 1 > 1 && git add ...
11
votes
2answers
15k views

Using setfacl to allow group members to write to any file in a directory

I'd like to use setfacl so that anyone in group 'app' can edit any file contained within /usr/local/users/app regardless of what the traditional UNIX permissions say. I have two users john and ben. I ...
10
votes
3answers
4k views

Why is a file with 400 permissions seen writable by root but read-only by user?

If I create a file as an unprivileged user, and change the permissions mode to 400, it's seen by that user as read-only, correctly: $ touch somefile $ chmod 400 somefile $ [ -w somefile ] && ...
10
votes
4answers
3k views

Sudoers for one day per week?

I have been volunteered by my boss to be the sysadmin for our production redhat server. He asked me to tighten the security to avoid mishaps like rm -f * that occured not long ago. Right now, we ...
10
votes
1answer
1k views

Debian: cannot remove symlink in /sys/: operation not permitted

I ran some commands without completely understanding them while trying to get screen brightness working and now I'm stuck with a nasty symlink in '/sys/class/backlight/asus_laptop' that I am trying to ...
10
votes
3answers
5k views

Maintain (or restore) file permissions when replacing file

I have a command that accepts a file as an argument, modifies the file, then writes it to the file name specified in the second argument. I'll call that program modifyfile. I wanted it to work "in ...
10
votes
1answer
12k views

how to view a directory's permission

What is the command with which you can directly view the permission bits of a directory?
10
votes
1answer
658 views

“cd” into /sys/kernel/debug/tracing causes permission change

I've faced a really strange issue today, and am totally helpless about it. Some of the servers I manage are monitored with Nagios. Recently I saw a disk usage probe failing with this error: DISK ...
10
votes
1answer
15k views

usermod -a -G group user not work [duplicate]

I use Ubuntu 12.04. I am trying to add the user gefalko to the www-data group. I use root@xxx~# usermod -a -G www-data gefalko If I understand correctly, I should now see www-data in the output of ...
10
votes
1answer
335 views

Have group permission but unable to create file

This question is originally posted on rsapberrypi stackexchange. Since it is not so raspberrypi-related, I think it's better to post here. I found a strange thing while playing with pi3B. I want to ...
10
votes
3answers
57k views

Allow a user to read some other users' home directories

I am new to system administration and I have a permission related query. I have a group called administration. Inside the administration group, I have the users user1, user2, user3, superuser. All the ...
10
votes
2answers
3k views

Can super user write into read-only files?

I've stumbled upon surprising (for me) permission behavior on FreeBSD. Let's say I'm operating as non-root user. I create a file, set its permission on read-only and then try to write into it: $ ...
10
votes
2answers
4k views

Group memberships and setuid/setgid processes

Processes which de-escalate privileges via setuid() and setgid() do not seem to inherit the group memberships of the uid/gid they set. I have a server process that must be executed as root in order ...
10
votes
2answers
6k views

Evince fails to start because it cannot read .Xauthority

I'm logged in remotely over SSH with X forwarding to a machine running Ubuntu 10.04 (lucid). Most X11 applications (e.g. xterm, gnome-terminal) work fine. But Evince does not start. It seems unable to ...
10
votes
1answer
27k views

How to change permissions of multiple files found with find command?

I have a directory with numerous files. Part of the files have the 755 permissions and the other part have 644 permissions. I'd like to convert the files with 755 permissions to 644. I have tried the ...
10
votes
5answers
20k views

How to give permissions to read write but not delete the file

I want to give users the ability to create write and read files in other user directory, but not to have option to delete the file after created ( sticky bit not going to work here ... ) for example :...
10
votes
2answers
8k views

User can't touch -t

When SCP'ing to my Fedora server, a user keeps getting errors about not being able to modify file timestamps ("set time: operation not permitted"). The user is not the owner of the file, but we cannot ...
10
votes
1answer
13k views

Why can't I create a file in a directory where I have group write access? [duplicate]

There's a situation I don't quite understand. I have this directory, where the group 'webadmin' has rwx rights : $ ls -la total 8 drwxrwxr-x 2 root webadmin 4096 Aug 27 12:17 . ⋮ ...
10
votes
2answers
16k views

How does umask affect ACLs?

Can someone explain to me how umask affects the default mask of newly created files if ACLs are activated? Is there some documentation about this? Example: $ mkdir test_dir && cd test_dir $ ...
10
votes
2answers
699 views

How is file ownership affected across different systems?

As I understand Unix file systems, any file on a unix system must belong to a group and a user of the said system. A file cannot belong to a group or user that does not exist on the system. From that ...
10
votes
1answer
2k views

What does x (execute) permission do on unix sockets?

By my experience unprivileged user can not access unix socket he/she does not own without x bit set. What does this bit do exactly? Thanks
10
votes
1answer
6k views

directory changes permission when mounted

I want to mount a samba sghare to a directory in my home dir. I have created it but mount the share as root. Upon mount, the owner of my dir changes to root and my user doesn't have permission tow ...
10
votes
2answers
13k views

USB drive permissions when automounting

On Debian there is the common problem, that you try to plug an ntfs formatted USB harddrive and then can't write to it as a regular user to it because the directory belongs to root. A little time ago ...
10
votes
2answers
1k views

Deny flash plugin access to (a particular) webcam

I recently bought an external webcam to play around with OpenCV. It works great out of the box in Debian, but I realized that when I browse any site that contain flash content (youtube, soundcloud), ...
10
votes
1answer
181 views

Why did FreeBSD lose the w mask but Debian retained it?

I am trying to understand the difference in behaviour between FreeBSD ACLs and Linux ACLs. In particular, the inheritance mechanism for the default ACLs. I used the following on both Debian 9.6 and ...
9
votes
2answers
2k views

Why do some umask values not take effect?

I'm trying to understand permissions better, so I'm doing some "exercises". Here's a sequence of commands that I'm using with their respective output: $ umask 0022 $ touch file1 $ ls -l file1 -rw-r--...
9
votes
5answers
70k views

Why do I get permission denied when using mv although directory rights are correct?

I get permission denied when trying to move folder Music via mv although directory owner is set to my user and user permissions are set to 7. What's going on? (I know that I could use sudo but I want ...