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.
2
votes
2answers
263 views
setuid and setgid confusion
I'm trying to fully grasp the concept of setuid and setgid, and I'm not quite sure in what way permissions are actually elevated. Let me provide an example:
Users
userA (groups: userA groupA)
userB ...
0
votes
3answers
84 views
File Privileges
There is one user Lets call him B and he needs access Just to Read the File MEANS READ ACCESS and that file is own by another user A .
How can I grant access to user A's file to User B.
1
vote
1answer
118 views
Hide parent directory but allow to view dir
I would like the following result on my UNIX system:
ls -l /users/test -> permission denied, or any other way so I can't see the content of it.
ls -l /users/test/testdir/ -> shows all files in the ...
2
votes
1answer
1k views
Why can I not chmod a file?
[nathanb@ka /x/sim/nathanb/nbsim1] ls -al ,nvram
-rw-r--r-- 1 root root 2097152 Jul 5 2011 ,nvram
[nathanb@ka /x/sim/nathanb/nbsim1] sudo chmod a+w ,nvram
chmod: changing permissions of ...
7
votes
2answers
293 views
chown removes sticky bit: bug or feature?
Steps to reproduce:
germar@host:~$ cd /tmp/
germar@host:/tmp$ touch test && chmod u+s test && ls -la test
-rwSr--r-- 1 germar germar 0 Nov 2 20:11 test
germar@host:/tmp$ chown ...
2
votes
2answers
330 views
Can't copy/move between filesystems with SFTP
Are there any limitations on SFTP that prevents a user from copying between filesystems? I have a SLES with SFTP, and users can't copy/move files between filesystems, even when the target is chmod ...
1
vote
0answers
71 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
303 views
ntp cannot open shared object file: Permission denied
On a server I haven't worked on, ntpd is broken:
# /etc/init.d/ntpd start
ntpd: error while loading shared libraries:
libz.so.1: cannot open shared object file: Permission denied
but permissions ...
2
votes
1answer
2k views
CentOS 6 VSFTP 553 Could not create file
I installed vsftpd yesterday on CentOS 6, however didn't get a chance to test it today. When I went to upload a test file it's coming back and giving me this error:
553 Could not create file
After ...
3
votes
2answers
182 views
Why is bash giving me (apparently) conflicting information about a file?
Background
I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1
I asked Bob to give me permission to read all contents of inputs:
[bob@server]$ ...
2
votes
2answers
107 views
Do best-practices indicate that usage of /var should be restricted to sudoers
I wrote a package, and would like to use /var to persist some data. The data I'm storing would perhaps even be thought of as an addition for /var/db.
The pattern I observe is that files in /var/db, ...
1
vote
1answer
193 views
Cron job - permission denied creating a file
I have a cron job:
#!/bin/bash
fn=db.backup.$(date +%m-%d-%y).sql
mysqldump -uMyUsr -pMyPass --add-drop-table dbName> $fn
find ./ -name '*.Z' -type f -mtime +7 -exec rm -f {} \;
I get an error:
...
6
votes
2answers
6k views
File permission issues with shared folders under Virtual Box (Ubuntu Guest, Windows Host)
I am using Ubuntu on Virtual Box and I have a folder which is shared between the host (Windows) and the VM (Ubuntu). When I open any file in the share folder in Ubuntu, I can not change it as its ...
1
vote
2answers
391 views
proftpd does not change default group for new files
I am Trying to configure ProFTPd to change group for newly created files/directories.
In my config I have this:
<Directory /home/*>
GroupOwner www
</Directory>
Which does not seem to ...
3
votes
2answers
130 views
What is the proper solution to a web server trying to write to a directory?
So, I have a box with a "deploy" user. This deploy user owns a code repository and wordpress is running on this box...
When wordpress attempts to do something like upload a plugin, it is using the ...
6
votes
4answers
563 views
When does chmod fail?
Under what circumstances will chmod fail?
I looked at the man page but it only specifies usage and doesn't go into details about what circumstances it won't work in.
I'd assume chmod will work if:
...
2
votes
0answers
651 views
Samba's “inherit permissions” does not inherit modes for other
I have a share with "inherit permissions = yes". I have a directory in the share with mode rwxrwsr-x. If I create a subdirectory, the modes are rwxrws---. The same happens with a parent directory with ...
1
vote
3answers
279 views
Copy files with permission 200
I want to recursively copy a directory, preserving file attributes, which contains a directory tree including some files that have permission 200 (i.e. --w-------).
The copy command cp -ar ...
1
vote
4answers
385 views
Automatically change file permission upon write to a folder
How can I create directories so:
/data
/data/user1
/data/user2
and make sure that whenever root writes inside them, depending on which directory it writes to, different owners are set.
Example:
...
2
votes
1answer
258 views
Specific directory permission for one user using sftp
My web server structure looks like this:
/Home/User/Public_Html/Website_one
/Website_two
/Website_three/Directory_one
...
2
votes
1answer
146 views
How come I can append to files to a directory without write permissions?
I understand this first example:
> mkdir foo
> chmod u-w foo
> touch foo/test
touch: cannot touch `foo/test': Permission denied
> echo "BAD" >> foo/test
bash: foo/test: Permission ...
1
vote
1answer
94 views
How to disable messages in unix if mesg and chgrp not allowed?
This is one of my questions for my exam ..
We are not supposed to use mesg y/n for this but we should effectively avoid mesgs along with the problem of not being able to change groups.
3
votes
2answers
265 views
Block SSH to all but root user
How can I modify my sshd_config so that it blocks access to all users except the root user?
I've had a look and I tried
AllowUsers root
DenyUsers *
But that doesn't do anything
3
votes
2answers
1k views
How do I find out if I am sudoer?
How does Linux system behave when I am not sudoer?
Here is what happens if I try to use sudo:
server:/tmp>$ sudo cal
[sudo] password for user:
Sorry, try again.
Is it possible that I just don't ...
4
votes
3answers
185 views
Can't read a file although it's in my group and permissions for group read are set
I encounter a strange problem on a unix/linux machine:
I'm member of a group, let's call it group A and a certain file (which has a different owner) belongs to group A as well. The permissions of ...
2
votes
1answer
872 views
Executing a script from Nagios event handler fails to run
I have Nagios running on a webserver. For this one Nagios service check in particular, if it fails, it will run a script. This script is triggered via Nagios event handlers.
Nagios event handler ...
1
vote
0answers
142 views
Samba: system group mapping
I have w2008R2 PDC and Linux server with samba and winbind. Now I'd like to add some domain users to Unix adm group in AD.
Let's say I have adm group defined in AD, and every user from this group ...
0
votes
0answers
294 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
108 views
Login to super user for running script
I have sample.sh script in /u01/dump location. I'm running it from root.
My requirement is while running the sample.sh script it has to be login as oracle1 user using SU (super user) and display all ...
3
votes
4answers
1k views
How to restore default group/user ownership of all files under /var?
I accidentally changed /var owner/group to my username and then changed it back to root, but not all the /var folders' owners are root, so is there anyway to change back owner/group of files/folders ...
0
votes
1answer
213 views
Simple python web server doesn't execute CGI scripts
I set up a simple python web server by opening a terminal in a directory and doing
python -m CGIHTTPServer
There is a CGI script in the directory but when I type into the browser
...
2
votes
3answers
1k views
read only access to all files in a specific sub-folder
I have got a specific folder located in "/home/.../reboot/". I have a series of users that require read-only access to the ever changing files within. My problem is that the same users are not ...
0
votes
1answer
693 views
Full access by group user of /var/www/html [duplicate]
Possible Duplicate:
How to add write permissions for a group?
On Centos 6 I'm trying to give full access to make and delete by the user mitch for /var/www/http.
I did addgroup www and then ...
1
vote
2answers
201 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?
1
vote
1answer
223 views
Trying to install fonts on Linux Mint Lisa, but it looks like I have a permissions or ownership problem
I downloaded the Source Code Pro family of fonts, but cannot install them via the Font Viewer. If I give myself admin powers, I can manually add them to the rest of the fonts, so I'm guessing it's a ...
3
votes
1answer
1k views
Cannot delete a file - permission denied - why?
[db2inst1][testing ~/sqllib/db2dump] rm db2diag.log
rm: cannot remove `db2diag.log': Permission denied
[db2inst1][testing ~/sqllib/db2dump] id
uid=1002(db2inst1) gid=107(db2iadm1) ...
4
votes
1answer
445 views
scp permission denied after 'hardening' with bastille
I recently 'hardened' two Ubuntu servers using Bastille, and now I get permission denied: scp whenever I try to scp files in.
SSH login works fine.
I've tried adding an /scp-dump folder with 777 ...
1
vote
3answers
4k views
How to grant read/write to specific user in any existent or future subdirectory of a given directory?
I'm a complete newbie in system administration and I'm doing this as a hobby.
I host my own git repository on a VPS. Let's say my user is john.
I'm using the ssh protocol to access my git ...
0
votes
4answers
3k views
How to permanently change the file/directory permission [closed]
How do I change the permission of file/directories such that I am able to create, edit, delete files/directories anywhere in my system? Currently I am using Ubuntu 12.04.
I tried
sudo chmod 777 -r ...
2
votes
1answer
2k views
How to force rsync to overwrite read-only archive files?
I'm using rsync to copy some source code. The copied code must not be modified at the destination place by my mistake while code editing. So I set --chmod=u-w flag to make it read-only after copying.
...
2
votes
0answers
372 views
Owner & Group setting for OpenCart install on CentOS 6.3
I'm setting up a development server on a HP microserver with CentOS 6.3. I'm relatively new to Linux and have ran into some issues/confusion. I have the server fully setup/updated with yum. It's a ...
6
votes
3answers
1k views
How to revert chown command?
If I run:
sudo chown -R user:user /
Can I revert it to what it was before I ran it?
4
votes
1answer
134 views
Emptying a directory owned by another user weekly
I have a temp directory set up where users can place whatever files they need to send to other users via HTTP. The owner of this directory is an SFTP user, and cannot run cron jobs.
I have one shell ...
3
votes
2answers
121 views
I want to modify root files while also being able to create non-root files in a single text editor session.
Catch 22: If I open my text editor without using sudo, I don't have permission to save any changes. If I open it with root privileges, any files I create are owned by root. I want to be able to ...
25
votes
2answers
4k views
Why can rm remove read-only files?
If I create a file and then change its permissions to 444 (read-only), how come rm can remove it?
If I do this:
echo test > test.txt
chmod 444 test.txt
rm test.txt
...rm will ask if I want to ...
1
vote
2answers
239 views
SMB Mount To Windows Server Appears to Lock up. Any Ideas?
We are running CentOS 6.3 with all the latest updates. (Attempt to resolve this issue)
The Server I am trying to connect to is a Windows Server 2008 R2 box. Though this applies to our old SBS'03 Box ...
2
votes
3answers
2k views
How do I backup via rsync to a remote machine, preserving permissions and ownership?
Drive A is 2TB in a closet at home.
Drive B is 2TB in my office at work.
I'd like drive A to be the one I use regularly and
to have rsync mirror A to B nightly/weekly.
The problem I have with this ...
1
vote
3answers
2k views
Apache 403 Forbidden on sub folders?
I can view all files in the root directory (/var/www) but as soon as i enter a sub directory (eg /var/www/test) i get a 403 Forbidden error. I'm running Ubuntu 12.04.01.
Have tried searching for ...
5
votes
1answer
110 views
Does the suid bit have any meaning for device files?
Does the suid bit have any special meaning for device files in Linux ?
2
votes
4answers
5k views
Transfer files using scp: permission denied
I try to transfer files from remote computer using ssh to my computer :
scp My_file.txt user_id@server:/Home
This should put My_file.txt in the home folder on my own computer, right?
I get
...