Questions tagged [permissions]

Permissions define the operations that authenticated users are allowed to perform on file systems, databases and other computer systems.

Permissions are a series of rules that defines the action that authenticated users of computer systems can do. Permission are employed in several systems, such as file systems, DBMS, apps (iOS, Android, Windows Store, ...) and claims-based identity.

From a programming perspective, we are not interested in how to assign permissions in a particular context (i.e. in a company) but in how these are implemented (which permissions are implemented, in which way we combine them, how they impact performance, ...).

This tag should be used:

  • for questions about how permissions work in a particular systems;
  • for scenarios/problems that involves permissions in a substantial way.

This tag should not be used for asking about the specific permissions that should be assigned in a particular scenario.

Related tags: , , ,

17586 questions
180
votes
47 answers

npm install errors with Error: ENOENT, chmod

I am trying to globally install an npm module I just published. Every time I try to install, either from npm or the folder, I get this error. npm ERR! Error: ENOENT, chmod '/usr/local/lib/node_modules/takeapeek/lib/cmd.js' npm ERR! If you need help,…
giodamelio
  • 5,465
  • 14
  • 44
  • 72
176
votes
6 answers

IIS_IUSRS and IUSR permissions in IIS8

I've just moved away from IIS6 on Win2003 to IIS8 on Win2012 for hosting ASP.NET applications. Within one particular folder in my application I need to Create & Delete files. After copying the files to the new server, I kept seeing the following…
EvilDr
  • 8,943
  • 14
  • 73
  • 133
165
votes
7 answers

Why do enum permissions often have 0, 1, 2, 4 values?

Why are people always using enum values like 0, 1, 2, 4, 8 and not 0, 1, 2, 3, 4? Has this something to do with bit operations, etc.? I would really appreciate a small sample snippet on how this is used correctly :) [Flags] public enum…
Pascal
  • 12,265
  • 25
  • 103
  • 195
159
votes
9 answers

pip install failing with: OSError: [Errno 13] Permission denied on directory

pip install -r requirements.txt fails with the exception below OSError: [Errno 13] Permission denied: '/usr/local/lib/.... What's wrong and how do I fix this? (I am trying to setup Django) Installing collected packages: amqp, anyjson, arrow,…
RunLoop
  • 20,288
  • 21
  • 96
  • 151
159
votes
6 answers

Detect permission of camera in iOS

I am developing a very simple video app. I use the official control: UIImagePickerController. Here is the problem. When presenting the UIImagePickerController for the first time, the iOS will ask for the permission. The user can click yes or no. If…
user418751
  • 1,937
  • 2
  • 18
  • 21
154
votes
13 answers

SQLite error 'attempt to write a readonly database' during insert?

I have a SQLite database that I am using for a website. The problem is that when I try to INSERT INTO it, I get a PDOException SQLSTATE[HY000]: General error: 8 attempt to write a readonly database I SSH'd into the server and checked permissions,…
Austin Hyde
  • 26,347
  • 28
  • 96
  • 129
149
votes
4 answers

Missing support for Firebase App Indexing (android lint)

I receive this lint warning when analysing my code (Analyse > Inspect Codes) on Android studios. App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more…
148
votes
2 answers

Where are sudo incidents reported?

Attempting something devious on my machine leads to ryan@debian:~$ sudo EAT_ALL_THE_COOKIES_BEFORE_DINNER [sudo] password for ryan: ryan is not in the sudoers file. This incident will be reported. Where is this incident reported, and how do I get…
user1717828
  • 7,122
  • 8
  • 34
  • 59
142
votes
7 answers

Python module os.chmod(file, 664) does not change the permission to rw-rw-r-- but -w--wx----

Recently I am using Python module os, when I tried to change the permission of a file, I did not get the expected result. For example, I intended to change the permission to rw-rw-r--, os.chmod("/tmp/test_file", 664) The ownership permission is…
AplusG
  • 1,469
  • 2
  • 10
  • 9
140
votes
8 answers

mysql - How to grant read only permissions to a user?

I have a mysql user, whom I want to grant all the READ permission on a db schema. One way is this : GRANT SELECT, SHOW_VIEW ON test.* TO 'readuser'@'%'; Is there a way to group all read operations in grant ?
Ajeet Ganga
  • 8,353
  • 10
  • 56
  • 79
139
votes
11 answers

can't chown /usr/local for homebrew in Mac OS X 10.13 High Sierra

Homebrew needs permissions in /usr/local and since no one else uses my laptop I have always simply done sudo chown -R $(whoami) $(brew --prefix) but in High Sierra, this gives chown: /usr/local: Operation not permitted What is the fix?
Dan
  • 2,851
  • 3
  • 20
  • 27
130
votes
3 answers

www-data permissions?

So I have a directory in /var/www (called cake) and I need to allow www-data to write to it, but I also want to write to it (without having to use sudo). I'm afraid to change the permissions to 777 in case some other user on my machine (or a hacker)…
q3d
  • 3,473
  • 8
  • 34
  • 39
130
votes
22 answers

Warnings Your Apk Is Using Permissions That Require A Privacy Policy: (android.permission.READ_PHONE_STATE)

In manifest not added android.permission.READ_PHONE_STATE. permission. Why error comes when I upload a new apk version error comes below. Your app has an apk with version code 1 that requests the following permission(s):…
130
votes
12 answers

Determining Whether a Directory is Writeable

What would be the best way in Python to determine whether a directory is writeable for the user executing the script? Since this will likely involve using the os module I should mention I'm running it under a *nix environment.
illuminatedtiger
  • 1,531
  • 3
  • 12
  • 8
120
votes
7 answers

Linux, Why can't I write even though I have group permissions?

I want to create a file in a directory owned by the staff group which I am a member of. Why can I not do this? bmccann@bmccann-htpc:~$ ls -l /usr/local/lib/R/ total 4 drwxrwsr-x 2 root staff 4096 2010-07-31 16:21…
Ben McCann
  • 18,548
  • 25
  • 83
  • 101