file-permissions | * | Authorization library
kandi X-RAY | file-permissions Summary
kandi X-RAY | file-permissions Summary
File permissions handling for Capistrano v3.*.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of file-permissions
file-permissions Key Features
file-permissions Examples and Code Snippets
set :file_permissions_roles, :all
set :file_permissions_paths, []
set :file_permissions_users, []
set :file_permissions_groups, []
set :file_permissions_chmod_mode, "0777"
gem 'capistrano', '~> 3.0.0'
gem 'capistrano-file-permissions'
$ bundle
$ gem install capistrano-file-permissions
require 'capistrano/file-permissions'
set :file_permissions_paths, ["app/logs", "app/cache"]
set :file_permissions_users, ["www-data"]
Community Discussions
Trending Discussions on file-permissions
QUESTION
Azure DevOps is overwriting the file permissions on a needed web file. So, I decided to add a step in my YAML Pipeline that ensures the files permissions are always set correctly.
I tested it on the server using the Command Line Tool (CMD) & it works great. However, I added the Step into my YAML & I get the following exception.
The term 'RX' is not recognized as the name of a cmdlet, function, script
- Is there something wrong with my YAML's command-line?
USING THE COMMAND LINE TOOL (CMD):
This is the RAW command-line I tested using CMD...it works fine...and the (RX) parameter is correct.
ANSWER
Answered 2021-Apr-21 at 12:25We recommend you use the 'Command Line' task instead of the 'PowerShell' task to run your script:
QUESTION
I'm really confused about how to properly copy files and grant permission to execute e.g. an AppleScript file from a sandboxed application. I've read several articles and threads but the more I read, the more it confuses me.
The TaskMy app needs to run a very simple AppleScript
from an .scpt
file. To do so (if I got this right), I need to copy this file into Users/thisUser/Library/Application \Scripts/.com.developerName.appName/
. Before I can interact with this folder the user needs to grant access to that folder. This can be done by showing the user an NSOpenPanel
where he can select the path. After confirmation the app has access to that path and I can copy the file and later run the script (App Sandbox User Selected File must be read/write). So far so good.
I find presenting a Finder window with an empty folder to select very user unfriendly, so I was wondering if there is anything else I can do. The closest what I have found regarding this problem is drag & drop the folder "into the app" - details can be found here.
I guess I'm not the only person ever who created a (sandboxed) app which needs to run specific scripts and I can't believe that the above approach is the only possible solution!? Therefore,
can I not just have a single window with an OK button and some information above that the app needs permission to write into that folder without showing an entire Finder window?
When I was looking around for solutions I also came across several settings for the app itself. Unfortunately, the docs are very limited here and I could not really find out what the specific settings actually do and how I could test them (admittedly this is because this is my first ever app for OSX and I have basically no clue what I'm doing). One of which is the Copy Files option in the Build Phase settings of the app:
This did sound promising to me since I thought that if I install the app it will automatically copy the file to the Scripts destination (probably with some sort of user prompt) and I can use it. But it does nothing. There is no copy happening at any time, even if I deselect the Copy only when installing setting. I have also tried the different destination folders which are available in the dropdown
and unfortunately also here I
- could not find out what the destinations are
- nor the file has been copied to any of the destination folders on
build
.
I know that people here don't really like to answer questions like this in much detail since it is probably more a lack of knowledge on my side but I would really appreciate it if someone could at least help me getting into the right direction and direct me to some resources which tackle my problem!
Thanks!
...ANSWER
Answered 2020-Jun-06 at 08:05Well, it seems like I have found a solution which (at least for me) seems to be more or less user friendly and within Apple's sandbox guidelines.
Again, I'm very new to app development using Xcode and SwiftUI so I'm not sure if this solution is 100% "the right way of doing it". But since it took me ages to find this out, maybe someone else can use it and speed up development!
SolutionLike I have mentioned in my question above, I was trying to get rid of the (in my opinion) pretty annoying NSOpenPanel
Finder prompt, where the user is supposed to select the folder. I further asked about the Copy Files setting in the app's Build Phase tab - it turned out that this was the solution! Unfortunately, I still don't have any clue about the list of destination which are presented in the dropdown but choosing Absolute Path and inserting
QUESTION
I am new in Laravel.
I am trying to delete the data folder which is under /storage/framework/cache/
.
I did php artisan cache:clear
which produces: Application cache cleared!
But when I go into the directory /storage/framework/cache/data
then I see the old cache folders are still there and when I try to delete the folder manually then I get permission issue.
I have followed the below thread to give permissions to the storage folder.
How to set up file permissions for Laravel?
Permission level -
...ANSWER
Answered 2020-Apr-29 at 22:11Why do you want to delete cache/data
directory?
I believe that folder is the part of default directory, of laravel
Default Stucture:
https://github.com/laravel/laravel/tree/master/storage/framework/cache
Which I believe by default is used by:
https://github.com/laravel/laravel/blob/master/config/cache.php#L53
If you want to make sure that your clear cache command works see the content of the data directory,
QUESTION
I'm upgrading to php7.4 and want to take advantage of the new opcache preloading.
When I service php7.4-fpm start
I get the following errors:
ANSWER
Answered 2019-Dec-27 at 07:01Try to put your opcachePreload.php
inside for example /var/www/html
and change opcache.preload
to
QUESTION
It's not so digital ocean specific, would be really nice to verify if this is an expected behavior or not.
I'm trying to setup ElasticSearch cluster on DO managed Kubernetes cluster with helm chart from ElasticSearch itself
And they say that I need to specify a storageClassName
in a volumeClaimTemplate
in order to use volume which is provided by managed kubernetes service. For DO it's do-block-storages
according to their docs. Also seems to be it's not necessary to define PVC, helm chart should do it itself.
Here's config I'm using
...ANSWER
Answered 2019-Nov-06 at 11:30Yes, this is expected behavior. This chart might not be compatible with Digital Ocean Kubernetes service.
Digital Ocean documentation has the following information in Known Issues section:
Support for resizing DigitalOcean Block Storage Volumes in Kubernetes has not yet been implemented.
In the DigitalOcean Control Panel, cluster resources (worker nodes, load balancers, and block storage volumes) are listed outside of the Kubernetes page. If you rename or otherwise modify these resources in the control panel, you may render them unusable to the cluster or cause the reconciler to provision replacement resources. To avoid this, manage your cluster resources exclusively with
kubectl
or from the control panel’s Kubernetes page.
In the charts/stable/elasticsearch there are specific requirements mentioned:
Prerequisites Details
- Kubernetes 1.10+
- PV dynamic provisioning support on the underlying infrastructure
You can ask Digital Ocean support for help or try to deploy ElasticSearch without helm chart.
It is even mentioned on github that:
Automated testing of this chart is currently only run against GKE (Google Kubernetes Engine).
Update:
The same issue is present on my kubeadm ha cluster.
However I managed to get it working by manually creating PersistentVolumes
's for my storageclass
.
My storageclass definition: storageclass.yaml
:
QUESTION
Is there any way to set per-volume permissions/ownership in Kubernetes declaratively?
Usecase:
- a pod is composed of two containers, running as two distinct users/groups, both of them non-root, and are unable to
sudo
- the containers mount a volume each, and need to create files in these volumes (e.g. both of them want to write logs)
We know that we can use fsGroup
, however that is a pod-level declaration. So even if we pick fsGroup equal to user in first container, then we are going to have permission issues in the other one. (ref: Kubernetes: how to set VolumeMount user group and file permissions)
ANSWER
Answered 2017-Oct-27 at 12:04One solution is to use init-container to change permissions of mounted directories.
The init-container would need to mount both volumes (from both containers), and do the needed chown
/chmod
operations.
Drawbacks:
- extra container that needs to be aware of other containers' specific (ie. uid/gid)
- init container needs to run as root to perform
chown
QUESTION
I was reading about files permissions in Linux, and I have some misunderstanding about reading permission:
I have a PHP file called a.php
with this permissions -r--------
so when I try to run it PHP a.php
the files is executed
so my question is why the file is executed even the exec permission is not on?
and as I know the read permission is for reading contents for the file .
I also check this File permissions for PHP execute but not help.
...ANSWER
Answered 2019-Aug-27 at 11:37php
is the script and it has execution permission while a.php
is just a parameter that passed to the script to be processed and as a.php
has read permission so it can be read and processed.
QUESTION
As the title says, I have a VPS running on CentOS 7, I installed all the requisites for Laravel, PHP 7.3, but it still giving me 'Server Error 500'.
Note that this is a fresh installation of Laravel with composer.
- My CentOS version is CentOS Linux release 7.2.1511 (Core)
- PHP version is PHP 7.3.6 (cli)
- I manually installed all the necessary modules from PHP
I already did quite a lot of research:
Laravel giving 500 internal error on centos 7 with apache and php 7
I followed what the answer to that questions says and still the same for me.
I did also set up permissions correctly following this other post:
How to set up File Permissions for Laravel 5 (and others)
Also these ones
Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
https://www.ionos.com/community/server-cloud-infrastructure/apache/how-to-fix-http-error-code-500-internal-server-error/
And a bunch of more articles I read on another websites.
These are the permissions for the project folder:
drwxr-xr-x 13 apache apache 4096 May 31 05:23 laravel
And for storage:
drwxr-xr-x 5 apache apache 4096 May 31 04:44 storage
Tried generating the key and got this:
ANSWER
Answered 2019-May-31 at 10:46Did you created the var/www/laravel/.env
file from your var/www/laravel/.env.example
file?
QUESTION
First of all, according to stackoverflow, this problem occurs when something is wrong with permissions of bootstrap/cache
and storage
directories. And I tried literally every advice on that with no luck.
I was happy user of Xubuntu 16.04 at my old laptop, developed one project. Using docker-compose
to set up development environment. Yesterday I bought brand new PC, installed Kubuntu 18.04, installed docker and everything I need to work.
Cloned repository, ran composer install
, docker-compose up
, then php artisan migrate
and php artisan storage:link
. But when I try to open website in browser, I get 500 error with empty body response.
APP_DEBUG is set to true.
6 hours later I'm here with literally zero results. Tried dozens of solutions found here and on forums (just example).
I even did a little experiment: removed project directory from my old laptop, cloned it from scratch, installed everything required and it worked. Without any permission problem.
And what kills me more: there are no logs inside docker containers, no logs inside laravel directory, just nothing.
Please help! What's wrong? Maybe it's Kubuntu? Maybe it's 18.04? Maybe it's newer docker version?
P.S. Right now bootstrap/cache
and storage
directories are owned by alex:alex
and has 775 permissions. Exactly same as at my laptop.
ANSWER
Answered 2018-Aug-12 at 07:53Add a dd($exception->getMessage());
to the exception handler class right before line 37. Run the request and check the response.
If that doesn't avail anything, verify the request is hitting the webserver by checking access and error logs. Check system logs also using dmesg
and similar.
Since you mention Docker, if you're using nginx, be sure your site configuration is not being overwritten when running docker-compose up
.
QUESTION
In Java, I would like to dynamically change the file permission of a Linux file. I have tried to set it with Files.setPosixFilePermissions as suggested from this other source: How do I programmatically change file permissions?, but I am getting the error
java.nio.file.FileSystemException: : Operation not permitted
I figured out that I am unable to set the file permissions as a user, since the file is owned by root. My question is: Is it possible to execute Files.setPosixFilePermissions by switching from user to root in java? And then switching back to user when done?
Here is the bulk of my code:
...ANSWER
Answered 2018-Oct-09 at 22:23There is no way to change the owner of a running process (be it a JVM or anything else).
You can however spawn a new, privileged process to do the "dirty" work.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install file-permissions
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page