The chmod tag has no wiki summary.
2
votes
2answers
37 views
'setfacl' permissions don't apply to directories created by git clone?
Here's how I am setting permissions for my website's root directory i.e. ~/public_html, where the files that my website serves are placed:
sudo chgrp -R www-data ~/public_html
chmod g+s ~/public_html
...
0
votes
3answers
59 views
Directory appears as file?
So we copied some photos in a directory across to a NTFS partition last night, and they were viewable from ubuntu.
Today the directory is not accessible from Windows, and when we booted back into ...
3
votes
4answers
118 views
chmod recursive permission on thousands of files
This is a more general question about 'chmoding' recursively.
I have this script which at some point needs to change the permissions recursively in a folder which has a few hundred thousand files.
...
0
votes
1answer
28 views
how to display I/O file on shell [closed]
I am writing shell script and I need to display my output at the same time however it doesn't work with 2> somefile.txt and if I do | tee -a somefilel it will not overwrite which I need to . <>
...
1
vote
1answer
38 views
Permission error to access mounted directory in localhost
OK, I formatted my flash to ext4 file system,
changed all the permissions to 777 and mounted it to /var/www/html/web.
Now, when i access localhost/web it gives the following error:
"You don't have ...
1
vote
1answer
46 views
Changed file access to read only but I can still write to the file. Why?
I am running a small embedded system built using buildroot. I have come across this strange behaviour when trying to set up my file permissions on the target device. To illustrate what confuses me I ...
23
votes
3answers
2k views
How to recover from a chmod 000 /bin ?
And now I am unable to chmod it back.. or use any of my other system programs. Luckily this is on a VM I've been toying with, but is there any way to resolve this? The system is Ubuntu Server 12.10.
...
0
votes
1answer
63 views
Removing access privileges to backup while maintaining current setup
I have a giant directory, and I am dealing with a backup.
I would like to store this backup in as safe of a way as possible.
One of the ways of doing that is removing rwx privileges through chmod.
...
1
vote
1answer
47 views
Safe to change owner of OS X system folders?
I'm trying to get Homebrew to work. That program's diagnosis tool gives me these suggestions:
You should probably chown /usr/local/etc
...
You should probably chown them:
...
2
votes
2answers
132 views
Unable to change permissions of file system root
When I write ls -la the output is :
tusharmakkar08-Satellite-C660 tusharmakkar08 # ls -la
total 88
drwxr-x---+ 10 root root 4096 Apr 18 19:43 .
drwxr-xr-x 4 root root 4096 Mar 18 17:35 ..
...
1
vote
1answer
56 views
chmod allowing write when I am not setting it
I've got a perl script which systematically changes permissions. The first thing the script does is remove all permissions. It does this by calling chmod(from perl). I did this as I found the set guid ...
3
votes
2answers
59 views
How can a user restrict their own group rights without being root?
How can I change my user rights from rwx to r-x at the group level? I'm trying to ensure that I cannot touch any data belonging to other users when I am developing and debugging my scripts. Once I've ...
1
vote
3answers
94 views
find . .[^.]* -type f -print0 | xargs -0 sudo chmod 664; does not work
I am using this command to set permissions for files recursively
clime@vm6879 /srv/www-php/steeltrading $ find . .[^.]* -type f -print0 | xargs -0 sudo chmod 664
But after executing that command ...
1
vote
1answer
75 views
chmod and chown not working in sudo called script
Based on this Serverfault question, my git user has permission in sudoers to run a wrapper script to move files into my webroot with git.
Everything is working fine except for the chmod and chown ...
1
vote
7answers
231 views
Convert ls -l output format to chmod format
Say I have the following output from ls -l:
drwxr-xr-x 2 root root 4096 Apr 7 17:21 foo
How can I automatically convert this to the format used by chmod?
For example:
$ echo drwxr-xr-x | ...
0
votes
2answers
53 views
Files created by 'make' aren't getting executable permissions by default
I'm trying to build a project, and when I use the command make, I get the following errors:
/bin/sh: line 4: .deps/ipset_bitmap_ipmac.Tpo: Permission denied
make[2]: *** [ipset_bitmap_ipmac.lo] Error ...
1
vote
1answer
40 views
Able to delete file without permission [duplicate]
I've been experimenting with file permissions and ownership lately, and I tried this:
touch a
sudo chown root:root a
sudo chmod 000 a
I can't read, write, or execute the file, but I can still ...
0
votes
1answer
103 views
Find all directories, in which user has access to search and echo this directories in shell
I need to find all directories, in which user has access to search(command find) and echo this directories in shell. USER is read from ksh.
for example:
read user
I know, if user want to use find ...
-1
votes
1answer
63 views
Why is ./filename required to run executable script? [duplicate]
After creating a Python script file, test.py, in my home directory, and running chmod +x test.py to make it executable, and placing #!usr/bin/env as the file header, I expected to be able to run the ...
1
vote
1answer
420 views
script failing with “chmod: … Operation not permitted”
A script of mine works fine when I run it, but fails when run by a different user, with an error of the form
chmod: changing permissions of `/A/B/C/D/E': Operation not permitted
(Here /A/B/C/D/E is ...
1
vote
2answers
91 views
Executable located in location A how to run it in location B?
So, I've an executable in my debian server and this executable located in /home/human/ExecuteIt, still i cant figure it out how to run my executable in another location. In my case it is ...
1
vote
2answers
118 views
How to make a path world-readable?
To make some item X world-readable, it is not enough for it to have the right permissions: each component of the absolute path leading to it must also have the right permissions. (My understanding, ...
1
vote
2answers
80 views
chmod wont work - no error message
Everytime I try to change the permissions of a file with chmod on my Ubuntu with a command like
chmod 744 /media/DATEN/Dokumente/Coding/Python/DirFileFuncts.py it doesnt work. I tried octal and =rwx ...
0
votes
1answer
100 views
Allow all group members to create directories and files
There are 2 users
sftp_user
apache
Both users belong to the updaters group as well as other groups.
New directories and files are created in the
/updates/ directory.
drwxrwsr-x 8 sftp updaters ...
1
vote
0answers
69 views
External HDD read/write permission changing from a cron job
So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
3
votes
2answers
357 views
Why does “chmod 1777” and “chmod 3777” both set the sticky bit?
To set the sticky bit on a directory, why do the commands chmod 1777 and chmod 3777 both work?
1
vote
1answer
41 views
Securely running LAMP under a specific user
I'm setting up a sandbox type of server that will be used by a couple users as a development environment and knowledge base. The server will have a web frontend so I've installed Apache, MySQL and ...
1
vote
1answer
104 views
What does it mean if a directory has only x (executable) permission for certain user/group?
I stumbled across the directory /etc/ssl/private on Ubuntu (12.04), it has following permission:
drwx--x--- 2 root ssl-cert 4096 7月 8 2012 private/
I wonder what does this mean for group ...
3
votes
1answer
97 views
Change who is able to chmod
Is there a way to change who can chmod (change the permissions of) a particular file?
It is only the owner of the file (without sudo-ing it), if my experimentation has been correct?
But what I want ...
3
votes
1answer
130 views
Clear setuid permission using numeric mode
On an Ubuntu Linux I have a directory with the setuid bit set (drwsr-xr-x) which I want to unset.
Neither chmod 755 nor chmod 0755 nor chmod 00755 (I though maybe the first 0 is interpreted as just ...
1
vote
1answer
121 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
2k 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 ...
4
votes
1answer
573 views
what is the difference between “chmod 775” and “chmod 2755”?
Question
What is the difference between "chmod 775" and "chmod 2755" ?
6
votes
4answers
570 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:
...
3
votes
1answer
143 views
How to create a folder which will change its contents’ ownership to what the folder has?
In a GNU/Linux OS there is no way to change ownership of a file until you are root. But what if I want to hide my system’s username e.g. before sending a file to someone, because some things like tar ...
0
votes
1answer
176 views
Unable to change file permissions [duplicate]
Possible Duplicate:
No effect of umask and chmod on mounted drives
I am not able to change file permissions using chmod from the user who owns the file as well as from root. I am using ...
2
votes
4answers
820 views
How to make executable of all files excluding a few file types?
I have a folder containing many C source file and the same number of its compiled output files.
I set executable bit to all this files but for some reason it was lost, making them not executable. (I ...
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 ...
4
votes
2answers
1k views
Get the chmod numerical value for a file
In FreeBSD and also in Linux, how can I get the numerical chmod value of a file? For example, 644 instead of -rw-r--r--? I need an automatic way for a Bash script.
2
votes
3answers
131 views
User with read access to /home
Pardon my ignorance but I can't seem to come up with a solution to this one.
I'd like to create a user that has read access to every user's home catalog located in /home.
Do I need acl's for this or ...
1
vote
1answer
288 views
External drive chmod does nothing
Why is it that I can do chmod on my files when they are on my laptops hard drive, but when i make files on my external drive, i can't change their access rights.
I do:
chmod 755 somefile,
and on my ...
2
votes
3answers
728 views
Change Folder Permissions
I started off with changing to the folder I want to change permissions for, and that is the opt folder.
$ cd /opt/
test@testVM:/opt$
So I tried changing the permissions for this folder now using:
...
3
votes
1answer
447 views
Giving SSH users read-only access to a directory
I'm running Fedora 17 and I want to give several users access to files on my secondary hard drives on /run/media/haukur/. This is what I initially did:
chmod -R 755 /run/media/
But every time I ...
4
votes
2answers
153 views
Is it possible to represent the +X symbolic permission with an octal value?
Is it possible to represent the +X symbolic permission with an octal value? The chmod(1) man page says:
execute/search only if the file is a directory or already has execute permission for some ...
2
votes
2answers
2k views
Find web server group? Permissions problem
I'm trying to make Wordpress work. I currently have this error message:
Could not create directory.
/var/www/html/wp-content/upgrade/theme_name
when trying to upload a theme. This is the ...
1
vote
0answers
275 views
Changing file permissions problem [closed]
A few hours earlier I bought a beaglebone (Ångström installed) and now I am trying to add nameserver 8.8.8.8 (google DNS) to /etc/resolv.conf. However when I open it with vim and try to add my ...
5
votes
2answers
247 views
vim: create file with +x bit
Is there any way to set +x bit on script while creating?
For example I run:
vim -some_option_to_make_file_executable script.sh
and after saving I can run file without any additional movings.
ps. ...
2
votes
2answers
147 views
execute bit on directories, but not files [duplicate]
Possible Duplicate:
How to apply recursively chmod directories without affecting files?
What is the command to apply execute permission for directories (for traversal), but leave the ...
3
votes
3answers
1k views
How to get permission number by string : -rw-r--r--
I need to set the same chmod, how to get number for -rw-r--r-- ?
2
votes
1answer
2k views
chmod: What does the `+a` parameter mean?
I was following a tutorial and it told me to run
sudo chmod +a "SOME_PARAMS" some/dir
I was surprised to see that fail telling me
chmod: invalid mode: `+a'
So I wonder: What does the +a mode ...