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.

learn more… | top users | synonyms (1)

0
votes
2answers
37 views

print the /etc/shadow file in the console

How do I change the permissions of an executable file to access the /etc/shadow file? So far I have the following bash script: #!/bin/bash gcc print.c -o print chmod +s print ./print exit 0 and ...
0
votes
1answer
26 views

Why do web create separate user for each software?

This is a very noob question, but whenever I am installing something, like ghost, nginx, mysqld I see commands such as, useradd ghost useradd mysql What is the reason for this? I can guess this ...
0
votes
0answers
21 views

How to set up the permissions using the CUPS backend?

I'm trying to write a script that takes command line parameters and parameter order, formats the output from CUPS server backend query, and configure the permissions and locations to install the ...
0
votes
1answer
12 views

Permissions for /etc/ssmtp/ssmtp.conf

I'm just starting with my own Virtual Server (and Linux). I've an apache2 and a few wordpress sites. I need to send mails via PHP (contact forms). I managed to install ssmtp with the help of a few ...
0
votes
0answers
20 views

How to correct Linux file system permission?

I've recently install Elementary OS on my PC and i mistakenly installed a program named "mount management", apparently it changed my file-system permission or i guess it does (because i checked theme ...
1
vote
0answers
35 views

How to gain ownership of external HDD (and all files/folders) mounted to /mnt

I've plugged in a USB Hard Drive to my new Debian Jessie machine. I've got it to auto-mount by updating /etc/fstab: UUID=21AE-9B96 /mnt/local/ext001 vfat defaults 0 2 ...but it's owner is root and ...
0
votes
1answer
23 views

What permissions should each file under .ssh have?

What permissions should each file under .ssh have? I just experienced some glitch caused by .ssh/config not having 600. What permissions other files there should have?
5
votes
3answers
379 views

Why is dd not protected against writing on the active disk ?

I use dd a lot. I live in a contant fear of making a mistake one day, for example writing on sda (computer disk) instead of sdb (USB disk) and then erasing everything I have on my computer. I know dd ...
0
votes
0answers
32 views

Protect folder with password [closed]

I want to do the following: I want to protect the directory "foo" located in "/ var / www / foo" so that any user can create a directory, I read a tutorial where they use a tool called EncFS to ...
1
vote
1answer
32 views

Moving physical disk from local computer to network server

In my Debian GNU/Linux based workstation I have a big nice disk (3TB), apart from my ssd where the OS is installed. I recently got an intel nuci5 and set it up as a home server, together with my ...
0
votes
1answer
25 views

What has priority - owner/user vs group permission? [duplicate]

I have just run into the case in which the owner-group of a file has more permissions than the owner-user of a file. user1@pc:/tmp$ ls testfile -l ----rw---- 1 user1 user1 9 Okt 16 13:16 testfile ...
1
vote
1answer
22 views

Noip “Can't locate configuration file”, but the file is there

I installed Noip and ran the command which created the config file /usr/local/bin/noip2 -C and then I ran the run command /usr/local/bin/noip2 and it returned Can't locate configuration file ...
1
vote
0answers
22 views

Granting access permission to normal user to a logical volume of a volume group [duplicate]

When I need to run a program with direct disk access, like read/write from /dev/sdb, I simply add the user to 'disk' group. In this way we don't need to disclose the root account the the user. However ...
2
votes
0answers
18 views

Maildir permissions for courier

I'm having difficulty with maildir permissions for Courier, an IMAP server I've installed on a box running Debian Wheezy. The mail directory I use is /var/mail/users, with the following permissions: ...
-4
votes
1answer
25 views

Arrange for files created in a directory to belong to the directory's group

How do I set permissions so that whoever creates any files or directories in /directory, the group owner should automatically be the same group owner of /directory? This is on RHEL.
0
votes
1answer
40 views

Grant FTP access to specific directory

I have setup CentOS on a box on my local network and installed httpd, PHP, Webmin (and UserMin) etc. I opted for ProFTPd and have opened up ports for FTP, Webmin and Apache. I can now access Webmin ...
2
votes
1answer
32 views

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

Everytime 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 ...
0
votes
2answers
28 views

Do I need to chmod 777 mounted volumes?

I have an openstack VM with the following users: [foo@influxdb ~]$ id root uid=0(root) gid=0(root) groups=0(root) [foo@influxdb ~]$ id foo uid=500(foo) gid=500(foo) groups=500(foo),10(wheel) ...
2
votes
1answer
53 views

can't execute a command even i'm in the group and command is -rwx--x---

I'm in $ORACLE_HOME/OPatch directory and when I type opatch then I get the response as, -bash: opatch: command not found If I do ./opatch, then I get the response as, /bin/sh: ./opatch: ...
0
votes
3answers
19 views

Setting global browsable permissions for subdirectories (r-x) but making files inaccessible to everyone but the owner and group members

I typically have a directory where I want all users to be able to browse through but having files be unreadable and unexecutable. I see some related questions that do not exactly match what I want: ...
1
vote
0answers
40 views

Tomcat unable to create file in dir owned by same group

I have a server running Tomcat, and I need Tomcat to create a file in a particular folder. Tomcat (technically a Java app) runs as the user 'tomcat', as evidenced by top: #top 1251 tomcat 20 0 ...
0
votes
1answer
33 views

Shell script permission denied despite +x flag

This is an odd one, it only happens on one server (shared hosting, so I have limited access to configuration and logs), but I can't wrap my head around it. I have a shell script which runs some app's ...
1
vote
2answers
37 views

Why the S_ISUID and S_ISGID mode bits got cleared when the owner or group of an executable file are changed by an unprivileged user

I was reading the man page of chown. I don't understand why S_ISUID and S_ISGID mode should be cleared when the function returns successfully.
1
vote
0answers
28 views

id mapping of NFS does not work for all directories

I have an NFS server/client setup. On both server and client, the user me exists and has the same UID. If I mount the /home directory from the NFS server on the client, I see that nobody owns the ...
2
votes
3answers
558 views

What mechanism prevents any user from accessing any other user's files via root?

On a multi-user system, what protects against any user accessing any other users files via root? As context, the question is based on my understanding as follows: There are two commands related to ...
2
votes
1answer
68 views

How to let a user create a directory although not create a sub directory

I'm trying to create a Bash shell script that allows for the transfer of files from a flash device to a archive in which the user will specify. Although I'd like to restrict this user from not being ...
0
votes
1answer
34 views

Deluge permissions on a Synology NAS

I installed Deluge through this guide. I have a Synology DS212+. To summarize: I installed Debian chroot (from the SynoCommunity repository). Through that I installed the packages deluged (server ...
8
votes
2answers
496 views

How to non-invasively test for write access to a file?

In a shell script, how do I easily and non-invasively test for write access to a file without actually attempting to modify the file? I could parse the output of stat, but that seems really complex, ...
0
votes
3answers
137 views

Is there a Linux equivalent of the Windows super-administrator?

Windows has a super-administrator account that has not only elevated privileges to perform protected system functions, but unfettered access to anything on the computer, regardless of user ownership. ...
1
vote
1answer
32 views

www-data has access to my home directory files and folders

I've never noticed this before and I have no idea how this has happened but some files and directories in my home directory belong to the www-data group. Here is what I have. drwx------ 2 root ...
1
vote
0answers
28 views

Copying files to a directory shared via ACL doesn't get default mask

I'm trying to setup a simple shared directory on an ext4 filesystem for a group of users to work on. Let's say i just need to give all permissions to all users belonging to the group "workgroup" to ...
1
vote
1answer
30 views

Find files belonging to a group

Actually I want to find all the files and folders that are under the same group, for example I have this : [test] user1/sam a.txt user9/sam b.txt user4/sam I'm looking for a command ...
1
vote
0answers
16 views

How do I recursively apply default ACLs of a directory to its descendants?

If I have a directory with default ACL entries assigned to it, but some or all of its descendant files and sub-directories have access or default ACLs that do not agree with those defaults, how do I ...
1
vote
2answers
46 views

How to check if the “sudo” permission will be necessary to run a command?

Is there a way to determine easily whether I can read or write to/from a given file, or whether I will need to use "sudo" to do so? Running commands unnecessarily as sudo means that those files get ...
1
vote
2answers
61 views

what is the purpose of setuid enabled with no executable bit?

I am trying to understand permissions in detail. I was reading about setuid and it's uses. However, this particular case confuses me. I have made a small script and now I have set the suid bit for ...
0
votes
0answers
34 views

User that can be accessed only from other user account

I have a number of users (23) but I want to create another user that can be accessed only from one of the user account to do some specific task. How can I do it. And obviously this user cannot be ...
10
votes
2answers
825 views

Run a binary owned by root without sudo

I had a question on a job interview: How can you execute (run) the program with the user user1 without sudo privilegies and without access to the root account: $ whoami # user1 $ ls -l ...
1
vote
1answer
24 views

my permission command doesn't work properly

find . a* -exec chmod o+r {} \; find . *d -exec chmod o+x {} \; I want to give o+r to all files that start with "a" and o+x to all files that end with "d", but these lines seem to affect all files ...
0
votes
2answers
22 views

How to change permissions to all files?

say I want to give set rw for g for all files in the current directory, how do I do it? I tried chmod 006 \; chmod g=rw I'm not sure what to use to represent files
0
votes
1answer
29 views

Terminal access permission denied, but GUI access okay. Why?

In OS X, as a limited user I used Terminal to su - [admin's name] and tried to move some files that were in the administrator's public drop box directory into /usr/bin. Couldn't do it. Permission ...
3
votes
1answer
24 views

How can I lock down a user account to the point that it can read/write/execute as little as possible?

I would like to lock down an Arch Linux user account to the maximum extent possible. The only functionality required for the account is to accept a non-terminal SSH session which allows the client to ...
1
vote
3answers
34 views

What is the mechanism for differentiating root requirements for terminal commands?

In the terminal, some operating system commands require root privileges and some don't. What is the mechanism for controlling this? Is each command actually a separate program with its own execution ...
0
votes
1answer
11 views

R/W on device from web script

Having a web script in PHP that communicate with a device. This device require root privileges. How to do this the best way security wise? There is two modes in the web app, one user and one admin. ...
0
votes
0answers
31 views

Permission denied tmp dir on STIG RHEL

I am writing a program for a DISA STIG version of Red Hat Linux 6.5. I wrote a shell script to do self extracting on the program and when it self extracts put temporary files in the tmp directory that ...
0
votes
1answer
19 views

Directories showing up in green(executable) even after removing execute permission for all. (Ubuntu 12.04) [duplicate]

I just copied a directory from a USB flash drive. I copied it from an NTFS drive and so all the files had execute permission. I executed chmod -x * to undo the execute permission. Despite that, all ...
1
vote
1answer
52 views

“You do not have the permissions necessary to view the contents of “Share on name.domain.com”.”

I am having some issues with Samba on my Fedora file share server. I've logged into as the vncuser below on the server itself and I can access the directory, however I get permission denied errors ...
1
vote
1answer
40 views

SUID-bit not working for executables within /tmp directory

Printing the value of getuid() and geteuid() from an executable with SUID-bit (chmod +s) turned-on, seems to result with the original caller ID instead of the owner id if the executable is located ...
0
votes
1answer
55 views

External Hard Drive Issue on mac

After the cd /Volumes command when I type ls it shows me my hard drive name twice, with different permissions. After that when I try to use mkdir to create a directory in the external hard drive I'm ...
2
votes
3answers
52 views

Password protect a single folder ( not a web folder )

I run debian and I'm looking to limit a folder to only be accessible by one user. How do I set the permissions up so only that one specific user can enter it, and no other user. The folder I'm talking ...
2
votes
1answer
127 views

write() system call ignores file permissions

I made a very simple program in C which writes "Test string" into file named "file.txt": root@3:~# cat test.c #include "unistd.h" #include "string.h" #include "stdio.h" main() { FILE *fp; int ...