file-permissions

Using Laravel Artisan and file permissions

眉间皱痕 提交于 2020-08-10 19:37:23
问题 I'm new to Laravel and I find this framework awesome. Artisan is also great but a have a little problem using it. Let's say that I create a new Controller with Artisan like this php artisan make:controller Test There will be a new file in app/Http/Controllers named Test and the permission on this file will be root:root When I want to edit this file with my editor over ftp I can't because I'm not logged as root. Is there any ways to tell Artisan to create files with www-data group for example

Get permission to work with files on my Amazon EC2 Ubuntu server using FTP-WinSCP

有些话、适合烂在心里 提交于 2020-06-25 09:48:12
问题 I have an Ubuntu server on Amazon, I installed everything for working with it (php, mysql, phpmyadmin, apache..), The problem is that I cant move around or edit files using the FTP. I get the error message: Permission denied. Error code: 3 Error message from server: Permission denied from my WINSCP. The only way I can trancefer/edit file is using 'putty' with the sudo/nano command. I found a lot of information about this on google, but there are no updated soulution I can find. Linux isn't my

How to properly instantiate os.FileMode

瘦欲@ 提交于 2020-06-07 13:47:06
问题 I have seen countless examples and tutorials that show how to create a file and all of them "cheat" by just setting the permission bits of the file. I would like to know / find out how to properly instantiate os.FileMode to provide to a writer during creation / updating of a file. A crude example is this below: func FileWrite(path string, r io.Reader, uid, gid int, perms string) (int64, error){ w, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0664) if err != nil { if path == ""

PHP file permissions, chmod & mkdir not working

ぃ、小莉子 提交于 2020-05-24 07:43:55
问题 I created a php function that allows me to add images to a folder within my web application project. Right now it only works when I manually set the permissions of the folder to write enabled. Unfortunately that is not exactly what I need, because when I push my code to my group members with git, they would still have to manually set the permissions of the folder to enable writing as well, in order for my pushed code to work. all my group members and I are each running this project locally

Nginx and PHP: no write permissions

北城以北 提交于 2020-05-15 10:43:06
问题 I have a problem with a PHP application (Baikal) that runs on Ngnix. The application has no (longer) write permissions for one of its config files. The problem might have occured after upgrading PHP. Here is some information about my setup: Operating system: Arch Linux Nginx version: 1.16.1 Nginx user: http PHP version: 7.4.1 Application: Baikal 0.4.6 Nginx config: server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name –––––––––; root /usr/share/webapps/baikal/html; index index

Storage Access Permission is not visible in app info

夙愿已清 提交于 2020-04-15 10:51:41
问题 I have added READ and WRITE storage permission to my android app in the manifest. I am using these permission to access the gallery images for some purpose. But when I am checking the app info for my application in android setting, the storage permission selector is not available in the app info page. However, all other permission selectors are there. My Question is not about how I ask for permission on the marshmallow. I have already defined runtime permissions in my code. Also all required

Storage Access Permission is not visible in app info

自作多情 提交于 2020-04-15 10:50:53
问题 I have added READ and WRITE storage permission to my android app in the manifest. I am using these permission to access the gallery images for some purpose. But when I am checking the app info for my application in android setting, the storage permission selector is not available in the app info page. However, all other permission selectors are there. My Question is not about how I ask for permission on the marshmallow. I have already defined runtime permissions in my code. Also all required

Append and write access to a Directory — FileIOPermission give not good result?

家住魔仙堡 提交于 2020-04-12 21:01:27
问题 I have one issue which is in fact solved, but I totally do not understand why it behaves like this. So I have a network share and I would like simply to verify if I have access to create new files and directories in that share. I have used two approaches to solve that, but in both I get different result. My test case is that I can't create files and directories on that share: Trying to create a new Directory — not a nice way try { var testPath = Path.Combine(path, testDirectory) Directory

Taking directory ownership on Windows with Python results in “Access denied” error

强颜欢笑 提交于 2020-04-11 08:22:20
问题 I'm trying to take ownership of a directory with the following code: sd = win32security.SECURITY_DESCRIPTOR() sd.SetSecurityDescriptorOwner(curUser, False) win32security.SetFileSecurity("C:/ProgramData/Test", win32security.OWNER_SECURITY_INFORMATION, sd) The SetFileSecurity call fails with an "Access denied" error. The access rights for the current user have been removed from this directory. In Explorer I can see it, but when I try to open it, I first have to take ownership as an

Docker Copy and change owner

做~自己de王妃 提交于 2020-04-07 14:05:40
问题 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 permissions to 770. If I do a su john inside my container, I cannot access any of the files or subdirectories in my test directory. It seems this problem is related to the ownership in the aufs filesystem, where the copied directory still is owned