Questions tagged [file-permissions]

For questions relating to file read/write permissions, user groups, executable bits etc. Be sure to include a tag for the operating system (Windows or Unix) and tag for operating system version.

For questions relating to file read/write permissions, user groups, executable bits etc.

Related tag:

Filesystem permissions on Wikipedia

3073 questions
937
votes
21 answers

How can I exclude all "permission denied" messages from "find"?

I need to hide all permission denied messages from: find . > files_and_folders I am experimenting when such message arises. I need to gather all folders and files, to which it does not arise. Is it possible to direct the permission levels to the…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
934
votes
17 answers

open() in Python does not create a file if it doesn't exist

What is the best way to open a file as read/write if it exists, or if it does not, then create it and open it as read/write? From what I read, file = open('myfile.dat', 'rw') should do this, right? It is not working for me (Python 2.6.2) and I'm…
trh178
  • 11,228
  • 5
  • 28
  • 37
714
votes
7 answers

Chmod 777 to a folder and all contents

I have a web directory /www and a folder in that directory called store. Within store are several files and folders. I want to give the folder store and all files and folders within the store folder all permissions. How do I do this? I am guessing…
RSM
  • 14,540
  • 34
  • 97
  • 144
440
votes
40 answers

Cannot read configuration file due to insufficient permissions

I've recently encountered an error trying to host my asp.net site with IIS. I have found a solution that many swear by. Solution: Add IIS_IUSRS with Read permission on files in the folder Change IIS authentication method to…
Freesnöw
  • 30,619
  • 30
  • 89
  • 138
413
votes
22 answers

How to set up file permissions for Laravel?

I'm using Apache Web Server that has the owner set to _www:_www. I never know what is the best practice with file permissions, for example when I create new Laravel 5 project. Laravel 5 requires /storage folder to be writable. I found plenty of…
Robo Robok
  • 21,132
  • 17
  • 68
  • 126
403
votes
11 answers

Permission denied on accessing host directory in Docker

I am trying to mount a host directory in Docker, but then I cannot access it from within the container, even if the access permissions look good. I am doing sudo docker run -i -v /data1/Downloads:/Downloads ubuntu bash and then ls -al It gives…
user3753011
  • 4,131
  • 3
  • 12
  • 3
372
votes
12 answers

How to restore the permissions of files and directories within git if they have been modified?

I have a git checkout. All the file permissions are different than what git thinks they should be therefore they all show up as modified. Without touching the content of the files (just want to modify the permissions) how do I set all the files…
Dale Forester
  • 18,145
  • 10
  • 27
  • 27
342
votes
20 answers

How to grant permission to users for a directory using command line in Windows?

How can I grant permissions to a user on a directory (Read, Write, Modify) using the Windows command line?
Amitabh
  • 59,111
  • 42
  • 110
  • 159
246
votes
7 answers

Git file permissions on Windows

I've read through a few questions regarding file permissions in Git and I'm still a bit confused. I've got a repo on GitHub forked from another. Post merge, they should be identical. However: $ git diff --summary origin/epsilon master/epsilon mode…
Synesso
  • 37,610
  • 35
  • 136
  • 207
244
votes
41 answers

NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)

I am stuck with this error no matter what directory I am in, and what I type after "npm" in cmd.exe. Here is the npm-debug.log: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program…
AnotherMike
  • 2,633
  • 2
  • 16
  • 15
209
votes
19 answers

"Permission Denied" trying to run Python on Windows 10

Seems as though an update on Windows 10 overnight broke Python. Just trying to run python --version returned a "Permission Denied" error. None of the three updates; KB4507453, KB4506991, or KB4509096 look like they'd be the culprit but the timing…
notanumber
  • 6,399
  • 3
  • 20
  • 32
188
votes
10 answers

Open a file with su/sudo inside Emacs

Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or sudo emacs. One way to do this is C-x C-f /sudo::/path/to/file but this requires an expensive round-trip through…
Chris Conway
  • 55,321
  • 43
  • 129
  • 155
175
votes
15 answers

move_uploaded_file gives "failed to open stream: Permission denied" error

I keep getting this error when trying to configure the upload directory with Apache 2.2 and PHP 5.3 on CentOS. In php.ini: upload_tmp_dir = /var/www/html/mysite/tmp_file_upload/ In httpd.conf: Directory /var/www/html/mysite/tmp_file_upload/> …
user63898
  • 29,839
  • 85
  • 272
  • 514
156
votes
18 answers

Laravel daily log created with wrong permissions

I have a script that I run using php artisan (with root user), and sometimes it causes the daily log file to be created before the apache www-data user does - which means that when a real user uses my web application, I get the folder permission…
NiRR
  • 4,782
  • 5
  • 32
  • 60
130
votes
3 answers

Docker Copy and change owner

Given the following Dockerfile FROM ubuntu RUN groupadd mygroup RUN useradd -ms /bin/bash -G mygroup john MKDIR /data COPY test/ /data/test data RUN chown -R john:mygroup /data CMD /bin/bash In my test directory, which is copied I have set the file…
Christian Metzler
  • 2,971
  • 5
  • 24
  • 30
1
2 3
99 100