permissions

Non-privileged, non-root, user to start or restart webserver server such as nginx without root or sudo

早过忘川 提交于 2019-12-20 14:06:33
问题 I'm using capistrano to deploy a rails web app. I want to give the deploy user on the webserver as few privileges as I can. I was able to do everything I need to do as a non-privileged user except restart the webserver. I'm doing this on an ubuntu server, but this problem is not specific to my use case (rails, capistrano, deployment), and I've seen a lot of approaches to this problem that seem to involve poor security practices. Wondering whether others can vet my solution and advise whether

Entity-level access restriction in the microservice architecture based on user or group membership

余生颓废 提交于 2019-12-20 10:57:18
问题 In the systems, there may be data that is restricted in nature. Sometimes access to specific entities should be easily restricted or granted based on user or group membership. What is the best way to implement this in the microservice architecture? #1 Should access control, managing permissions etc. be the responsibility of the microserive itself? Developers will have to implement access control, store, and update permissions for every service. Seems like not very robust and error-prone

sudo open -e ~/.bash_profile Permission denied mac

孤者浪人 提交于 2019-12-20 10:54:10
问题 I am trying to edit bash_profile file to add path to my sdk through the following command on my mac machine. sudo touch ~/.bash_profile; open -e ~/.bash_profile It opens the file in TextEdit but does not allow me to edit it. Though i have given super-user permission and password while running the above command. It is giving me following message when i try to edit it. "You don’t own the file “.bash_profile” and don’t have permission to write to it. You can duplicate this document and edit the

Why does LinkedIn v2 Share API give not enough permissions error on any v2/shares endpoint?

拟墨画扇 提交于 2019-12-20 10:29:08
问题 When I make a call to any v2 LinkedIn share API endpoint such as https://api.linkedin.com/v2/socialActions/{share URN}?oauth2_access_token={access token} I get a response saying "Not enough permissions to access /socialActions/{target} GET ". Our application was recently given access to marketing API which is how I got the r_ad_campaigns permission. The share API documentation gives no explanation of why this error would occur or what permissions I may be missing. Has anyone been able to

Best user role permissions database design practice?

自闭症网瘾萝莉.ら 提交于 2019-12-20 09:20:25
问题 I want to design database for a web app in which user can access particular tabs based on the permissions given to a role. What I have done so far is I created two tables USER_TABLE and USER_ROLES . USER_TABLE has below fields: id (primary key) user_name password first_name last_name created_date role_id_fk (foreign key) USER_ROLES has below fields: id (primary key) role_name (e.g. ADMIN, TAB1_USER, TAB2_USER) created_date Here, the user having role_name " ADMIN " can see all the tabs, other

Permissions error github (ssh key not recognized)

荒凉一梦 提交于 2019-12-20 08:44:35
问题 I seem to have lost my permissions to a github account after pushing to it from another (local) repository. I am now receiving the following error: git push Permission denied (publickey).fatal: The remote end hung up unexpectedly I then took the following steps to regenerate a key: ssh-keygen Set up an ssh on my account for this laptop, using id_rsa.pub However, this was unsuccessful. When I try the following code suggested, I receive the following error: ssh-add -l Could not open a

How to disable Google asking permission to regularly check installed apps on my phone?

拥有回忆 提交于 2019-12-20 08:31:05
问题 I'm developing an Android app, which I therefore endlessly build and install on my test device. Since a couple days I get with every build/install a question asking Google may regularly check installed apps for potentially harmfull behaviour. Learn more in Google Settings > Verify apps. I get the option to Accept or Decline. I've declined about a hundred times now, but it seems to be Googles policy to keep on asking until I get sick of the message and finally click Accept. But I don't want

open_basedir, File() is not within the allowed path

一笑奈何 提交于 2019-12-20 07:29:08
问题 I'm having an issue with Laravel, installed on a Media Temple DV: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/mywebsite.com/:/tmp/) This is the code that is giving this issue: if (empty($this->cookie_file)) { $this->cookie_file = tempnam("", "phrets"); } I'm thinking that it might be a permissions thing, but I'm really not too sure. 回答1: It seems you need to add directory you use form tempnam into open_basedir or ask your server

How to check a directory has a read/write permission

冷暖自知 提交于 2019-12-20 07:04:34
问题 I have a directory as shown d-wx--x--x 2 bcheudev bcheudev 4096 Jun 18 06:16 test which shows the directory does not have read permission. But when i check the same through shell script it's giving result as dir test has read permission. export IN_DIR=$MMHOME/test if [ -d ${IN_DIR} ] then if [ ! -r ${IN_DIR} ] then echo "${IN_DIR} Directory is not readable.">>$log_name exit 255 fi else echo "${IN_DIR} Directory does not Exists.">>$log_name exit 255 fi inside second if it's not going. Please

Can't get applet to read text file

好久不见. 提交于 2019-12-20 06:47:37
问题 I've tried to get my Java Applet to read from my text file, but I do not have sufficient privaleges to read the file when i run the applet in my browser. I have tried to use policy files but I cannot seem to get them to work. I later tried System.setProperty("java.security.policy", "*filelocation*"); but i got this error java.security.AccessControlException: access denied (java.util.PropertyPermission java.security.policy write) at java.security.AccessControlContext.checkPermission(Unknown