1
vote
2answers
31 views

How would you assign read-only permissions to run ls -l /proc/{pid}/fd for processes you don't own

How would you assign read-only permissions to run ls -l /proc/{PID}/fd for PIDs (processes) you running as another user. Ideally, you wouldn't be able to do anything else and you would not have ...
1
vote
1answer
49 views

How can I tell why I have permissions to read a file? [closed]

Here's what I just noticed on my CentOS SSH account: stat output $ stat /dev/kvm File: `/dev/kvm' Size: 0 Blocks: 0 IO Block: 4096 character special file Device: ...
5
votes
2answers
144 views

Why ssh-agent group ownership is not root

Trying to understand why ssh-agent has sgid bit and found this post ssh-agent has sgid I have another question, why the group ownership of ssh-agent is nobody not root? What is the reason behind it? ...
3
votes
3answers
332 views

What are the world writable directories by default?

In a standard Linux filesystem, which of these common directories are world-writable by default? /tmp /etc /var /proc /bin /boot /.... .... Why are they world-writable? Does that pose ...
1
vote
0answers
63 views

Limit program execution to a list of arguments

I would like that my Unix users can only run a specific command insecurecommand with a controlled list of arguments stored in a file. The only solution I have found at this time is to : Create a ...
1
vote
2answers
48 views

Permissions under a 700 (rwx------) directory

If a directory /foo/bar/baz has 700 (rwx------) for its permissions, thereby making it inaccessible to all but its owner (and the superuser), does it matter what the "group" and "other" permissions ...
1
vote
2answers
77 views

/etc/init.d permissions issue

We are trying to harden our Linux Redhat 5 servers and one of the findings is for the /etc/init.d. The security finding is requiring that we chmod it to 700 or more restrictive. Please see the ...
0
votes
1answer
47 views

Execute scripts without decrypting them

I have a set of scripts (bash, ruby, python) and want to put everything into a container like file so I can deploy this container on a lot of servers. This scripts need to protect from accessing other ...
-1
votes
1answer
62 views

How to Always make the ttyUSB0 none root access allowed?

Ubuntu 13.10 64-bit OS. I have a service running using Python serial the application running without root as username. But it has to access /dev/ttyUSB0 , so i need to do every time manually chmod -R ...
9
votes
4answers
1k 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 ...
14
votes
6answers
3k views

Can root/superuser read my read-protected files?

On shared unix hosting, if I have a file sensitive-data.txt and I issue: chmod 600 sensitive-data.txt Can root user still read my file? Specifically I'm wondering if it's safe to store my password ...
2
votes
2answers
330 views

Is a -rw-rw-rw- file really inaccessible inside a drwxrwx— directory?

Say I have a directory with these permissions: drwxrwx--- Inside this directory, a file with these permissions: -rw-rw-rw- Is the file readable/writable by everyone or not ? If not, how secure ...
0
votes
3answers
267 views

noexec on /tmp and /var/tmp directory

Our client servers are running old version of jboss (Jboss 4.0) which has lots of known vulnerabilities. Result is that the server is hacked and we are seeing some unknown executables running from ...
6
votes
6answers
188 views

File protection in Unix

Is there a way to protect a file in such a way that even root cannot delete it or rewrite it after creating it? I have a file which is created by root under /var/log/ and I want to restrict all users ...
31
votes
4answers
1k views

Why can't I execute shutdown when the permission is rwxr-xr-x?

I'm in /sbin and I see that shutdown has permissions rwxr-xr-x. Doesn't this mean that anyone can execute it?
4
votes
3answers
182 views

restrict student account permissions, give faculty access

I have set up two user groups, students and faculty on Ubuntu 12.04 and created a number of students and faculty accounts. The problem is a student can currently see & read all of the files of a ...
2
votes
1answer
102 views

How 'passwd' gains ROOT user permissions?

How does Linux knows that it has to give euid 0 (uid of root) to only certain process like passwd, setuid, etc. If a process can gain root user's permissions, will it not lead to security breach in ...
0
votes
3answers
322 views

How to make accessible folder/file to other user

How is it possible to make a folder under $HOME accessible to other users? I thought that's the case why we have softlinks but apparently I am missing some bits here. Can someone please shed a light ...
5
votes
4answers
337 views

Allowing rename but not moving to other directory

Users can upload/delete/rename files via vsftp server and everything works well except they can also move files across directories. Is it possible to allow renaming of files but disallow moving them ...
1
vote
2answers
374 views

Can any user account in Linux invoke command chmod?

Since permissions are sensitive, is it vital to be clear whether a specific user is or not allowed to run command chmod?
3
votes
1answer
94 views

New webserver: What all user accounts should I create and permissions to provide for

This is a followup on my question here. I am setting up the first webserver and am fumbling with what user accounts to create and permissions to provide for better security. Below is what I have. ...
6
votes
3answers
211 views

Under what scenarios would I want to set a SUID bit?

I'm struggling to wrap my mind around the concept of SUID bits and why they're would be useful. For example, let's say I have a program: -rwsr-xr-x 1 root root 12364 Jan 12 2013 ...
2
votes
1answer
77 views

Bad to own a directory outside of your home directory?

Some how, can't remember why, I got into the habit of downloading source to the directory /opt, which I chown to my user/group. I have this feeling that it is not a good thing to do. Is there ...
2
votes
2answers
515 views

How to password-protect a script on Linux?

How do you set a password to execute a command or script in Linux? I need to avoid a script (in which user and password details are included) from being used/executed from unauthorized users. So is ...
0
votes
1answer
843 views

Security - Giving Apache write access to /var/www/html

I am running Worpdress on an CentOS Webserver. Now, to enable wordpress to be able to upload/write files to the default webserver directory /var/www/html I had to do the following change on the ...
-2
votes
1answer
133 views

Break write permission for non root user?

Can non root user edit files he/she doesn't have access to or create new a file in a directory he/she doesn't own? Is there a way to do that? P.S : I know if root user or file owner gives him write ...
3
votes
5answers
514 views

Protect folder from sudoers

Is there an ability to not allow sudoers view your folder (only you and root can access folder)?
3
votes
2answers
3k views

Allow a specific user or group root access without password to /bin/date

As the title would suggest, I'd like to give a user or group full root access to the /bin/date command, including any manner of arguments as defined in the man pages. I understand /etc/sudoers ...
1
vote
4answers
4k views

What type of permissions should a user's home directory and files have?

I'm working with a fresh install of Ubuntu 12.04 and I've just added a new user: useradd -m testuser I thought that the -m flag to create a home directory for users was pretty standard, but now ...
2
votes
3answers
348 views

files in /proc/$PID (e.g. ssh-agent, Chrome) are not owned by user but by root

I am just answering another question here :-) and thus had a look – wanted to have a look at /proc/$PID/fd of ssh-agent in order to find out which socket it uses. But I can't. I am quite surprised to ...
1
vote
1answer
239 views

LAMP Server setup for personal development

I am setting up a LAMP server in VirtualBox for personal development. This will be an Ubuntu Server 12.04 install, and I will be using Virtual Hosts for Drupal, Yii, and other small PHP apps. Ideally ...
0
votes
2answers
489 views

How do I make PHP securely load files from the server root home folder on CentOS?

So I built what I thought would be this awesome reporting page in PHP that loads data from some CSV text files and creates nice Google charts and tables for our clients. I then thought it would be ...
1
vote
3answers
144 views

Taking away a User's Read/Write/Execute Permission

So I have a user that is able to go in /etc and read files like httpd.conf. I would like to deny that user access to any critical locations such as /etc, /var and so on. What would be the best way ...
1
vote
5answers
653 views

How do I disable copy permissions?

Can we set permissions, on a Linux box OR for a particular directory (Scientific Linux in my case) that, one can read files but cannot copy, move or delete them? Update: My Scenario is, We developed ...
2
votes
1answer
448 views

Properly Set Permission to /home/user folder for webserver

I'm currently setting up my own Linux server running CentOs 6. To test the security on my server I wrote a PHP script that acts like a sort of "navigator". I can go one directory up, open the files, ...
1
vote
2answers
57 views

What permissions should I set if I'm the only user?

I'm the only user on a OS X machine and am wondering what the best practice is for setting permissions on my sensitive files. Specifically, are there reasons to prefer one of the following -rw------- ...
5
votes
2answers
335 views

Can a user brute-force a directory listing without having read permission on the directory?

I noticed that when a user is working in a directory to which he does not have read permission that using cd produces different error messages, depending on whether or not a subdirectory exists: $ ls ...
4
votes
3answers
915 views

Is it impossible to run as `root` if the machine isn't rooted?

By default, the user of the device does not have access to certain root objects (e.g. the /data directory). Even though these objects are off-limits, however, it would seem to me that these objects ...
2
votes
2answers
833 views

Moving a root directory to a separate partition

I'd like to create a new partition and move the contents of the /var directory to it for the security reason of having /var/www and other subdirectories "mounted" with nosuid, noexec, and nodev ...
1
vote
1answer
895 views

add members of wheel group, sudo access

On Fedora15, following this wiki, I added a user to wheel group, which is already in the sudoer config file. but still I get not-a-sudoer error prompt. Should I specifically name every member of a ...
1
vote
0answers
85 views

Running Tomcat MySQL and Apache under a group

I am trying to set up a web server at home using Ubuntu, but prefer my bash scripts to be platform agnostic hence why I am asking here. I also dislike apt-get everything. I am trying to create a ...
1
vote
0answers
713 views

Symbolic link to a socket

From a security point of view, is it safe to create a symbolic link to a socket file? The following bits of context refer to the deployment of a web application on a shared hosting service. $ ls -al ...
1
vote
2answers
800 views

What does “0” mean in the owner and group permission lists of a file/folder?

The question is in the title. What does the number 0 signify?
4
votes
1answer
1k views

How to configure permissions to allow apache to securely have access to a file in a shared environment?

This is a follow up question from my previous, but I felt it might be more Linux based. http://serverfault.com/questions/414207/how-to-set-linux-permissions-to-allow-apache-to-have-access-to-a-file ...
3
votes
2answers
298 views

Can AIDE scan a directory inside a directory the user doesn't have read permissions for?

I would like to use AIDE to help me verify the integrity of my home directory on a shared Linux system. I am not an administrator of this system. I have built and installed AIDE in my home directory ...
4
votes
2answers
737 views

How to set secure permissions for multiple users and multiple websites?

On a Gentoo 3.2.12 server with apache2+php, there are several websites running: /www /website1 /website2 ...etc The apache user should have read-only access to all the websites. There ...
1
vote
2answers
1k views

Allow non-root process to access all home directories without compromising security?

Any ideas how to allow one non-root process to access (read&write) all home directories without compromising security? Normal users should not have access to each other's home directories. All ...
3
votes
3answers
289 views

Setting execution right to whole directory - is it good or bad idea?

I have a zip file containing lot of files and directories for a certain application which should be running on Linux. Some files needs to be set as executable, but the zip file format afaik does not ...
2
votes
2answers
907 views

A command to check file access permission for another user

I need to know how to check the effective file access permissions for a given user, but it takes long to do this manually starting from / up to the target file or directory, checking group, ...etc.
3
votes
1answer
155 views

mounting volume protected against user access

I need to mount a directory in a way that prevents user accessing it. However I need to have access to all attributes (including permission) from root. Is following method safe or is there a way ...