Questions tagged [chmod]

A Unix tool for changing file permissions

Filter by
Sorted by
Tagged with
10 votes
4 answers
5k views

Can a file that is executable be read?

If a file has permissions -rwx-wx-wx can it be read by other and group users, or can it only executed and written? Is there some way to read an executable file by executing it?
Tom's user avatar
  • 731
0 votes
3 answers
391 views

Possible to globally change chmod permissions based on logged in user?

This is a little embarrassing to ask, but I just set up a ubuntu server with openssh. Is it possible to create a user that has read-only access to chmod **7 files if that user is not the owner, nor ...
user784637's user avatar
  • 1,592
-1 votes
1 answer
828 views

chmod apply to user group [closed]

I need to set the permissions of a dir so that a usergroup in my ubuntu-server has read/write permissions. I understand that I'm supposed to use chmod (right?), but how do I set the permissions to ...
AlexanderNajafi's user avatar
0 votes
1 answer
314 views

How to achieve user permission isolation?

/opt/software /home/user1/file /home/user2/file user1 can rwx to /home/user1/file user2 can rwx to /home/user2/file softwarecan rwx to both /home/user1/file and /home/user2/file user1 can't rwx to /...
ispirto's user avatar
  • 89
2 votes
2 answers
275 views

Make files editable for guests without using chmod

Sorry if this is the wrong place to post this, or if it has been posted before. I couldn't find anything though. If I log on to a linux server without supplying a username or password (from windows ...
user avatar
1 vote
1 answer
1k views

Why can I only upload files via vsftpd if folders are chmod 777?

I have a problem with vsftpd on Debian: I can upload files if the chmod of all folders is 777, but with chmod 755. Please help. vsftpd.conf: local_umask=022 anon_umask=0755 file_open_mode=0755
user avatar
1 vote
3 answers
236 views

The secure linux server by dir permissions

I am using php on Linux / Apache server. I have Three type of directories like as |_ Writeale Directory |_ PHP Files |_ Image Files Writeable Directory would used only by PHP to writing some txt, ...
Huseyin's user avatar
  • 126
1 vote
2 answers
140 views

What rights does /vol/www have on ubuntu web server?

We are deploying our rails app on a ubuntu 10.04 server. When cap deploy:setup, there is a error saying that: * executing "mkdir -p /vol/www/myapp /vol/www/myapp/releases /vol/www/myapp/shared /vol/...
user938363's user avatar
0 votes
2 answers
615 views

Create Symbolic Link to files below user's home dir

I apologize in advanced if this question is better suited for Stack Overflow. We have a CentOS cPanel server and we want to share some PHP code base with another user. We don't have open_basedir ...
Mikey1980's user avatar
  • 761
0 votes
1 answer
3k views

chown, chmod & bad settings on /home/user/.ssh directory in fresh install of CentOS 6

I just finished installing CentOS 6 last night (netinstall from georgia tech repository), and have been running into some weird SSH issues when I try to SSH from the CentOS box (behind my home network)...
David W's user avatar
  • 3,459
3 votes
3 answers
2k views

Cross-group file permissions in Linux

I have 2 users: Alice and Bob and 2 groups: Management and Personnel. Alice has primary group Management, and secondary groups Personnel and Alice. Bob has primary group Personnel and secondary group ...
user avatar
0 votes
2 answers
1k views

How can i protect my php files on a server (chmod ?)

I have a dedicated server, on this server i have two vhosts. and i will give the access of the server to two people. In my php file there's the database password and i don't want to share that with ...
Gordon's user avatar
  • 1
0 votes
3 answers
1k views

Apache Documentroot access forbidden

Running Arch Linux I am trying to get apache to use /www (not /var/www) as DocumentRoot. /www is a softlink to /home/user/www. However, I keep getting an "Access Forbidden" error. The / and /home ...
user avatar
5 votes
5 answers
20k views

is it safe to chmod 775/664 with owner www-data:www-data?

To make working with my webserver easiest I am proposing doing something like the following: sudo chown www-data:www-data /var/www -R cd /var/www sudo find . -type f -exec chmod 664 {} \; sudo find . ...
Alex Hadley's user avatar
3 votes
4 answers
2k views

What are the cons of restricting chmod to root/sudo users?

I have an issue with some of my users misusing chmod by doing things like chmod 777 ~ -Rf I'd like to disable chmod so that only users with full sudo rights (I.E. IT) have rights. Are there any ...
Dan R's user avatar
  • 255
1 vote
1 answer
162 views

CHMOD crashes mysql

I believe I have a data corruption issue on my server. This server has been hitting performance issues over the past few days with a specific set of software: gallery2. I've been attempting to fix it ...
robr's user avatar
  • 113
2 votes
4 answers
179 views

How to own a folder and use by 3 users

3 users, 1 folder. Users: vsftpd (FTP server), bobmarley (normal user), www-data (Apache user) How to unite them and make so that each user can modify any of these user's data, without doing CHMOD ...
alryaz's user avatar
  • 21
4 votes
1 answer
6k views

File permission mask/mode settings for Samba on FreeNAS?

I'm currently working on the Samba settings on a FreeNAS server. When any user creates a file or a folder on the server I want the file or folder to get the following RWX permissions: Folders: ...
tkahn's user avatar
  • 141
2 votes
1 answer
416 views

Setup Directory Permissions For Multiple Users To Read/Write

I am trying to figure out how to setup the permissions on a directory (/apps) so both the root user, and another user justin can read, and write into the directory. The user justin is part of the ...
Justin's user avatar
  • 5,438
7 votes
4 answers
15k views

Change group ownership of Folders with chmod g+s

I have a folder hierarchy that I want to change the group ownership including any subsequent file/folder additions. I was going to use chmod g+s but I'm not sure if it applies to already created ...
mike628's user avatar
  • 309
0 votes
2 answers
7k views

Wordpress: chmod 600 wp-config.php (or 640) and get white screen of death. What do?

I'm working with Wordpress for the first time and, as per the security guidelines in this guide, I'm chmodding wp-config.php to 600 (user can read/write, no one else can do anything). However, this ...
Dylan Knowles's user avatar
3 votes
3 answers
9k views

ssh hostname returns “Bad owner or permissions on ~/.ssh/config” (chmod 600 not working with MingW)

This question is a near duplicate of Robert's question but after trying chmod 600 ~/.ssh/config I still have the same error. I've tried using cygwin and MINGW32 to do the chmod 600. ls -la returns -...
user29600's user avatar
  • 429
2 votes
2 answers
390 views

File Permissions on Ubuntu (umask)

I want to make all folders in a directory chmod to 755 and individual files to chmod 644. Is there a way I can use umask (e.g. umask 022) to specify these permissions in the future? Thanks in ...
Trent Scott's user avatar
3 votes
2 answers
15k views

Limit sudo to only one directory and it's subdirectories by sudoers file

So I would like to limit Apache to only change permissions in a certain folder and all of it's sub-directories, so this is what I have in my sudoers file apache ALL= (ALL) NOPASSWD: /bin/chmod -R [g+...
SeanDowney's user avatar
0 votes
2 answers
5k views

Is there an alternative for this chmod command on Debian?

I'm trying to setup a chmod using this command sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs apparently this does not work on debian. Any clue ...
Paté's user avatar
  • 115
6 votes
2 answers
4k views

What exactly does this dpkg command do?

I fixed a permissin problem for nagios like discribed here. The command was: sudo dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw sudo dpkg-statoverride --update --add ...
The Shurrican's user avatar
1 vote
1 answer
496 views

Ubuntu sftp default save permissions issue

I have a server running Ubuntu 8.04 LTS with sftp running on it. My problem is that when I access the server with sftp (using the username of one of my admin accounts, not 'root') and upload a file it'...
Casey Flynn's user avatar
2 votes
4 answers
2k views

chmod: copy permissions (with extended permissions) from one file to another

I've got a ZFS filesystem that's shared via CIFS. Somehow, the permissions have got all messed up, to the point where the ownership is all correct but a whole bunch of files have 0000 permissions. ...
growse's user avatar
  • 8,050
4 votes
4 answers
4k views

Why is it so important to remove 777 permissions?

I'm writing installer for my PHP web app. It requires user to change permissions of a few files and directories (config.php, cache, uploads, .htaccess) to 777 (so that it's writable). I've seen in ...
radex's user avatar
  • 155
1 vote
1 answer
153 views

Permissions for user on linux machine to host website

I have root access to my hosted machine. I have created a user account 'abcd' and the user's directory is: /home/abcd/public_html In httpd.conf i have: <VirtualHost *:80> ServerName abcd....
siliconpi's user avatar
  • 1,817
1 vote
1 answer
2k views

file permissions on shared host

I'm on a shared host, and a bit confused about file permissions: My website directory /home/user/www is owned by user:nobody Everything inside /home/user/www is owned by user:user (?) Most people ...
admirabilis's user avatar
  • 1,665
0 votes
1 answer
682 views

Home folder permission in Ubuntu for apache public_html

I read a lot about that here, but I guess I just can't get it. So here is what I got: I have Ubuntu 10.04 installed and I just created vhost for a domain, let's call it example.com. I also created a ...
John Gold's user avatar
1 vote
2 answers
6k views

Fixed: Apache - PHP permissions to create / edit files and directories?

I have a server on rackspace clouds... Fedora 13, and I installed apache, mysql. Now, I have a piece of code (PHP) that my web app uses a lot. It works on my local machine running XAMPP, but when I ...
DylanJones_md's user avatar
1 vote
1 answer
2k views

Permissions to use for Wordpress on Ubuntu with Webmin

What are the best permissions for a Wordpess install on Ubuntu managed by Webmin? Currently, root owns all the files and all of the files are also set to the root group. I'm using the virtual server ...
user65712's user avatar
  • 387
1 vote
1 answer
270 views

Made a mess of privileges for /var/www

I've got an installation of Ubuntu 10.10 running in virtualBox which I'm going to use for some local development. I've installed PHP, Apache and MySQL and want to use vsftpd to access /var/www so I ...
james246's user avatar
  • 141
0 votes
2 answers
101 views

User in group with r/w access does not actually get the read/write anything

I added my user to the www-data group. I chmodded a certain directory to 774 (-R, recursively) so only the owner and the group can change something. Yet my user can't even access it. What am I ...
Jelle De Loecker's user avatar
1 vote
1 answer
2k views

What should be the directory mode for /var/www/html folder?

I am having trouble uploading files to my /var/www/html folder. This is the current mode: Permission denied (SSH_FX_PERMISSION_DENIED: The user does not have sufficient permissions to perform the ...
yoko's user avatar
  • 13
0 votes
3 answers
2k views

Can't do Chmod on Apache error logs in Ubuntu

I am trying to clear the logs and I do not have permission since the file permissions on Apache error logs are like this: -rw-r----- When I tried to do something like chmod 777 error.log I got this ...
Genadinik's user avatar
  • 1,143
1 vote
2 answers
655 views

chmod a folder permanently

kind of a newbie to server stuff. I am running a centOS setup with whoosh search engine for my django app. Everytime I restart or rebuild my index i get a warning that states IOError: The path to ...
ApPeL's user avatar
  • 141
2 votes
4 answers
2k views

how to change permissions of specific file type

file * | grep 'ASCII text' | chmod -x chmod: missing operand Try `chmod --help' for more information. The above command gives me error.Basically I am trying to find all the files whose type is ...
Registered User's user avatar
1 vote
0 answers
3k views

Lighttpd 403 Errors on HTML and PHP pages

I installed lighttpd on CentOS 5.5 64-bit. Everything seems fine and running except I cannot get past 403 errors on both HTML and PHP pages. I have used CHMOD and CHOWN, changed ownership in the ...
Brian's user avatar
  • 11
3 votes
3 answers
2k views

Alternative to having directories with 777 permissions

I am running several websites on my dedicated server and a lot of my sites require that some directories have permissions set to 777. I know this is a major security issue, and I also know it's ...
lewisqic's user avatar
  • 181
1 vote
2 answers
4k views

revert chmod 777 / -R

while executing a command i made a mistake and executed (ubuntu 10) sudo chmod 777 / -R # okay you may laugh now all my filesystem has 777 permitions , obviously i dont know which ...
user70247's user avatar
  • 125
19 votes
2 answers
39k views

How to set file/folder permissions using Rsync from Windows to Linux

I want to transfer lots of files/folders from Windows to Linux using Rsync. On linux server(destination), I want the file permission set to 644, and folder permission set to 755. If possible, I want ...
garconcn's user avatar
  • 2,418
4 votes
1 answer
5k views

Only allow a user to CHMOD and CHOWN in their home directory or a specified directory

I have a Windows user on my network who has Samba access to our linux development server. Occasionally permissions or ownership will become confused for reasons unknown and he will no longer be able ...
Treffynnon's user avatar
2 votes
5 answers
922 views

Chmod: defintion of everyone (777)

If I Chmod a directory a to 777. What exactly does Everyone mean? Anyone who connects with FTP without using the password or something else? I have a Wordpress CMS and I'm trying to install a plugin, ...
Jonathan.'s user avatar
  • 155
1 vote
2 answers
3k views

Every file in a specific folder always 777?

I want to create a folder that is accessable via FTP on an Ubuntu Box. There are four users that are allowed to connect via FTP and I want them to be able to share files without restrictions. Is it ...
Grokla's user avatar
  • 13
2 votes
2 answers
154 views

Unix Group Permissions

I have created a directory and chown to have permissions master:webmaster and chmod the folder to 775 hence group writeable. So why is it i bert as a member of webmaster cant mv the directory or ...
bertsisterwanda's user avatar
1 vote
2 answers
3k views

Lost Permission on Files using wrong chmod syntax Centos 5.5

I was trying to remove write permissions on an entire directory, and I used the incorrect command: chmod 644 -r sites/default I meant to type chmod -R 644 sites/default The result was this: ...
alloutfallout's user avatar
0 votes
1 answer
156 views

Writing directory: permission denied even though dir seems to be chmodded correctly

I am having some trouble creating files in directory on my Ubuntu machine: I added myself to the www-data group in order for me to easily edit stuff in my /var/www dir on my development machine. ...
Aron Rotteveel's user avatar