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
63
votes
10 answers

How do I check if a directory is writeable in PHP?

Does anyone know how I can check to see if a directory is writeable in PHP? The function is_writable doesn't work for folders. Edit: It does work. See the accepted answer.
SeanDowney
  • 17,368
  • 20
  • 81
  • 90
62
votes
3 answers

How can I exclude all “permission denied” result lines from “grep”?

So, the thing is, I'm on linux terminal using grep command and I want the output without all the lines where it prints at the beginning "grep:" or the lines that begins with "./", because now I'm getting something like this: grep: ./users/blabla1:…
gleba
  • 703
  • 1
  • 7
  • 8
62
votes
5 answers

Setting Inheritance and Propagation flags with set-acl and powershell

I am trying to mimic the action of right-clicking on a folder, setting "modify" on a folder, and having the permissions apply to the specific folder and subfolders and files. I'm mostly there using Powershell, however the inheritance is only being…
Tim AtLee
  • 917
  • 1
  • 10
  • 17
62
votes
9 answers

What is the best way to manage permissions for a web application - bitmask or database table?

I'm considering the best way to design a permissions system for an "admin" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks…
Hari
  • 1,056
  • 1
  • 10
  • 13
59
votes
4 answers

How to stop git from making files non-executable on cygwin?

I use git on Windows via cygwin and soon decided to use filemode=false (since otherwise I've got a lot of changes after the initial git clone). I'm definitely not interested in tracking permission at all, the only think I need is for some files to…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
58
votes
2 answers

Dockerfile replicate the host user UID and GID to the image

Similar to the SO post about replicating UID/GID in container from host but how do you build the image with a user with replicate UID and GID? Preferably, how do you do it with a dockerfile? I can do it with a bash script: #!/bin/bash # current…
minghua
  • 5,981
  • 6
  • 45
  • 71
58
votes
11 answers

Wireshark - you don't have permission to capture on that device mac

I installed Wireshark and during the installation it showed an error but the installation itself completed. When I ran the program and tried to capture packets on my network, it showed this error: I'm new to mac so i don't even know how to properly…
martinhajny
  • 585
  • 1
  • 5
  • 6
56
votes
4 answers

Django is_staff permission decorator

I am trying to limit access to pages using 2 user levels. Superuser and admin. Super user is a regular Django user with 'is_superuser' assigned. Admin user is also a regular user with only the 'is_staff' permission assigned. The problem is that when…
Dim
  • 815
  • 2
  • 7
  • 12
56
votes
6 answers

Write file with specific permissions in Python

I'm trying to create a file that is only user-readable and -writable (0600). Is the only way to do so by using os.open() as follows? import os fd = os.open('/path/to/file', os.O_WRONLY, 0o600) myFileObject =…
lfaraone
  • 49,562
  • 17
  • 52
  • 70
56
votes
6 answers

Permission denied at hdfs

I am new to hadoop distributed file system, I have done complete installation of hadoop single node on my machine.but after that when i am going to upload data to hdfs it give an error message Permission Denied. Message from terminal with…
Vignesh Prajapati
  • 2,320
  • 3
  • 28
  • 38
56
votes
1 answer

How does git handle folder permission?

I'm using git version 1.5.6.3, and it seems git doesn't notice a folder's mode changes #create a test repository with a folder with 777 mode :~$ mkdir -p test/folder :~$ touch test/folder/dummy.txt :~$ cd test :~/test$ chmod 777 folder/ #init git…
hdorio
  • 12,902
  • 5
  • 34
  • 34
55
votes
6 answers

Execute root commands via PHP

I have a CentOS 5.7 linux server and use php5.3.x. On a pfSense system, you can restart services-that required root permissions using a php web page. I'm trying to do something similar, I have written some php code to execute shell commands. For…
Mehmet INCE
  • 553
  • 1
  • 5
  • 4
55
votes
1 answer

How to remove specific permission when build Android app with gradle?

Recently Google auto merge permission from Google Service to final release apk. Some one ask here Why are permissions being automatically added to my AndroidManifest when including Google Play Services library My problem is some permission don't…
DzungPV
  • 1,561
  • 3
  • 18
  • 24
55
votes
26 answers

Meteor: unexpected mongo exit code 100

I have just installed Meteor version 0.5.9 (45fef52095) to my CentOS release 6.3 (Final) server (Linux version 2.6.32-279.19.1.el6.i686 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Dec 19…
Aaron Cunnington
  • 1,631
  • 2
  • 15
  • 23
53
votes
3 answers

gyp WARN EACCES user "root" does not have permission to access the dev dir

Trying to sudo npm install protractor -g and the same notorious error/warning again (googled to no avail): gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/dmitrizaitsev/.node-gyp/0.12.0" What seems to happen is…
Dmitri Zaitsev
  • 13,548
  • 11
  • 76
  • 110