file-permissions

Let non-root user write to linux host in Docker

谁说我不能喝 提交于 2019-12-21 02:56:18
问题 I have an OpenSuse 42.3 docker container image that I created which has a single user, which we will call 'streamuser'. I would like this to be the user that is active whenever anyone creates a container from my image. I have mounted the host's home directory to the home directory of streamuser. The trouble that I'm having is that if I run the Docker container on a Linux host, streamusercan not write anything to the host directories. This is because streamuser does not share the same UID and

OS X permission denied for /usr/local/lib

元气小坏坏 提交于 2019-12-20 19:11:41
问题 I'm looking for any advice/intuition/clues/answers on a permission issue that has been plaguing me ever since I switched over to a new Macbook pro. Here's the dilemma. Certain programs copy libraries under /usr/local/lib during install and upon running these programs I get a crash which I believe is related to permission restrictions to files in this folder. I've had errors (can't access files from this path) trying to install plugins for audacity and then tried doing an "ls" under this

OS X permission denied for /usr/local/lib

夙愿已清 提交于 2019-12-20 19:11:11
问题 I'm looking for any advice/intuition/clues/answers on a permission issue that has been plaguing me ever since I switched over to a new Macbook pro. Here's the dilemma. Certain programs copy libraries under /usr/local/lib during install and upon running these programs I get a crash which I believe is related to permission restrictions to files in this folder. I've had errors (can't access files from this path) trying to install plugins for audacity and then tried doing an "ls" under this

Granting Access Permission to a file to a specific user [closed]

谁说胖子不能爱 提交于 2019-12-20 10:36:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . In linux, how can I give access permissions to a file/folder to a specific person. In other words suppose I want to allow only and only user fred to be able to read a file, then how do I do that? Note that I know about chmod and all, but Linux doesn't seem to provide a fine tuned access permission control where

Unicorn unable to write pid file

左心房为你撑大大i 提交于 2019-12-20 10:11:50
问题 I am using deploying a Ruby on Rails app to a Linode VPS using Capistrano. I am using Unicorn as the application server and Nginx as the proxy. My problem is that I am not able to start Unicorn because of an apparent permissions issue, but I'm having a hard time tracking it down. Unicorn is started using this Capistrano task: task :start, :roles => :app, :except => { :no_release => true } do run <<-CMD cd #{current_path} && #{unicorn_bin} -c #{unicorn_config} -E #{rails_env} -D CMD end I get

“Permission Denied” using cygwin in Windows

筅森魡賤 提交于 2019-12-20 09:56:05
问题 Background: I am trying to write a [.bat] file so I can double click it and a bash script will get invoked. The bash script will start up a few windows GUI apps to monitor GPU/CPU temperatures. I just did a fresh install of cygwin v1.7.7-1 (downloaded today) and windows 7. Code: monitor-temps.bat: C:\cygwin\bin\bash.exe ~/bin/monitor-temps.bash pause Code: monitor-temps.bash: #!/usr/bin/bash "/cygdrive/c/Users/michael/Desktop/apps_and_drivers/GPU-Z.0.4.8.exe" & Output: After I double click

Single command to create a file and set its permission

こ雲淡風輕ζ 提交于 2019-12-20 09:12:58
问题 I am using the following 2 commands to create a 0B file and set its extn to 644 touch filename.ext chmod 777 filename.txt My question is that whether there is any single command in unix (korn shell) that will do the two things together that is to say create a 0B fil with desired permission? 回答1: install -m 777 /dev/null filename.txt 回答2: For bash , simply use chmod with file redirection and history expansion: chmod 777 filename.txt>>!#:2 For ksh and zsh you have to drop the history expansion

IOError: [Errno 13] Permission denied:

ⅰ亾dé卋堺 提交于 2019-12-20 03:36:09
问题 I have built this code to specifically identify a load of .XML files and to extract co-ordinates from those files. Here is my code: from xml.etree import ElementTree as ET import sys, string, os, arcgisscripting gp = arcgisscripting.create(9.3) workspace = "D:/J040083" gp.workspace = workspace for root, dirs, filenames in os.walk(workspace): # returms root, dirs, and files for filename in filenames: filename_split = os.path.splitext(filename) # filename and extensionname (extension in [1])

How do you take file ownership with PowerShell?

余生长醉 提交于 2019-12-20 03:24:10
问题 Issue : I wish to programmaticly (with PowerShell) take ownership of a file that I have absolutely no permissions on. Update : I've thoroughly rewritten the question to give steps to reproduce the issue. Here's what I'm doing: ########################################################## # Logon as UserA ########################################################## $file = "C:\temp\file.txt" new-item C:\temp -type dir new-item $file -type file # Remove inheritence $isProtected = $true

Checking for file existence in C++

廉价感情. 提交于 2019-12-20 02:34:07
问题 Currently I use something like: #include <sys/stat.h> #include "My_Class.h" void My_Class::my_function(void) { std::ofstream my_file; struct stat file_info; if ( filename_str.compare("")!=0 && stat(filename_str.c_str(),&file_info) == 0 ) { my_file.open(filename_str.data(),std::ios::trunc); //do stuff my_file.close(); } else if ( filename_str.compare("")==0 ) { std::cout << "ERROR! ... output filename not assigned!" << std::endl; } else { std::cout << "ERROR! File :" << std::endl << filename