file-permissions

Docker Copy and change owner

若如初见. 提交于 2020-04-07 14:00:07
问题 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

bak file not visible when trying to restore database

若如初见. 提交于 2020-03-19 06:57:15
问题 I am trying to run a classic asp project on visual studio and therefore I am trying to restore a database. I cannot seem to find the .bak file when trying to restore it. It wasn't visible in the C-drive. I have looked it up and have seen that it has something to do with permissions. I have tried enabling permissions after properties>security of .bak file to 'Everyone', it did not work. I have also tried NT Service\MSSQLSERVER . Please see the following below. 回答1: You also have to enable

How to get read external storage permissions?

一个人想着一个人 提交于 2020-03-13 07:56:00
问题 I'm developing an mp3 player application for android and I'm getting an error related to user permissions(READ_EXTERNAL_STORAGE) This is my code where I ask for permissions: int permissionCheck = ContextCompat.checkSelfPermission(PlayListActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE); if (ContextCompat.checkSelfPermission(PlayListActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { // OPCIONAL(explicaciones de poque pedimos los permisos)

Strange file permission in docker container (question marks on permission bit and user bit)

孤街浪徒 提交于 2020-02-28 07:44:11
问题 I write a Dockerfile and docker-compose.yml to build a custom image which combines beakerx and cling, which contents are below. FROM beakerx/beakerx MAINTAINER liudonghua123 <liudonghua123@gmail.com> # not works #RUN conda install xeus-cling notebook -c QuantStack -c conda-forge -y --quiet USER root # install gcc7 RUN add-apt-repository -y ppa:jonathonf/gcc-7.2 RUN apt-get update -y RUN apt-get install -y gcc-7 # revert to beakerx user USER beakerx ARG CLING_FILENAME=cling_2018-09-04_ubuntu16

Can I protect my CRON scripts from remote users?

柔情痞子 提交于 2020-02-20 11:17:27
问题 I am currently working on a new project which involves using CRON jobs. The CRON script basically runs an SQL query, generates the data into a file, and send that file to another server via FTP. The script is on a live website (www.website.com/sendOrders.php) I don't see any security issues or threats, and I think it is highly unlikely that anyone will find the PHP script on the server. However I don't want the script to be executed by any outsiders. Is there a way I can protect this script?

git deploying project - file permissions - (chmod)

随声附和 提交于 2020-01-28 06:49:31
问题 I'm deploying my project with git to a remote server using a post-update hook. More specifically I'm following these steps. Everything on my local copy has the right permissions, however after deploying with git push production , files that are set to 777 change in the remote server to -rwxr-xr-x I've added to both (local/remote) .git/config the core variables filemode = false and I've changed as well my umask in /etc/profile to 0002 Any ideas why it keeps changing the mode of files? Thanks

git deploying project - file permissions - (chmod)

我的未来我决定 提交于 2020-01-28 06:47:04
问题 I'm deploying my project with git to a remote server using a post-update hook. More specifically I'm following these steps. Everything on my local copy has the right permissions, however after deploying with git push production , files that are set to 777 change in the remote server to -rwxr-xr-x I've added to both (local/remote) .git/config the core variables filemode = false and I've changed as well my umask in /etc/profile to 0002 Any ideas why it keeps changing the mode of files? Thanks

Git Directory Permissions Always 000

陌路散爱 提交于 2020-01-25 06:21:05
问题 By messing around with Git objects, I've found that the tree entries within a tree object always have these permissions. 040000 DirEntry hash The 04 means that it is a directory, but the permissions are 000. Does this mean that Git does not store tree permissions, or is that how Unix works? 回答1: Yeah. Git does not store permissions for tree objects, even though directories Unix filesystems do have them. For files, git only stores the executable bit (+x). All files are assumed to be readable

File handling with non-administrative user

泪湿孤枕 提交于 2020-01-25 00:32:15
问题 I've been testing my application to see how well it works when run by a non-administrative user, and I have found problems with file handling. I am getting an UnauthorizedAccessException when trying to overwrite a file, if the file was created by and adminstrative user. When writing out the file I first create the file as a .tmp file, then use File.Copy to overwrite the original. The .tmp file gets created, but File.Copy fails. My files are written to a public directory ("C:\Documents and

Docker file permissions mismatch between host dir and container using bind-mount

馋奶兔 提交于 2020-01-24 20:44:06
问题 The problem My docker-compose stack is comprised of 'postgresql', 'redis' and 'Python api server' along with a few others like opentracing etc., but the problem area is restricted to the before mentioned. The entrypoint in my compose file is a shell script that creates a few files and folders dynamically by reading the environment variables amongst the other things it is supposed to do. Now, the creation of these files work like a charm but the file and folder permissions of these dynamically