file-permissions

Multer, Node, EACCES error on C9.io

喜夏-厌秋 提交于 2019-12-08 04:28:35
问题 Hiya all thanks in advance for any help you can provide. I am using C9.io, node, express, multer, gridfs-stream. And Im getting: /home/ubuntu/workspace/node_modules/multer/index.js:25 mkdirp(dest, function(err) { if (err) throw err; }); Error: EACCES, mkdir '/uploads' I run the server.js script and that is the error that I get. I believe is something to do with permissions but i have tried chown the public folder and chmod ax, you guys have any other suggestions as to what to do?. Still get

How to set the permission on files at the time of Upload through Amazon s3 API

萝らか妹 提交于 2019-12-08 02:34:12
问题 Is there any way to set the file permission at the time of uploading files through Amazon S3 API. In my current solution i am able to upload the file on my bucket but i can not view the file through the URL which is mentioned in the file properties section. It is opening when i am passing access keys in query string. Is there any settings required in Amazon S3 or i need to set the permissions to all the file at the time of upload. Thanks in Advance. Kamal Kant Pansari 回答1: Add a header to

Why does `git pull` fail on my webserver?

[亡魂溺海] 提交于 2019-12-08 01:32:14
问题 I use git to pull changes os a site's code base. The changes inside files and deletion of files works, however, when I add new files or directories (not empty ones) to the repo, it wont get pulled locally to the webserver, when pulling no error message is displayed but when checking for that file, it is not there. Online at the bitbucket repo it is shown. Tried to delete the local git repo and clone it again, this way I get all the files from origin, but the problem persist when doing a pull

preserving file permission when creating a tarball with Python's tarfile

故事扮演 提交于 2019-12-07 21:57:01
问题 hello stackoverflowers, I want to preserve the original file permissions when using Python's tarfile module. I have quite a few executable files that lose their permissions once the tarball is extracted. I'm doing something like this: import tarfile tar = tarfile.open("mytarball.tar.gz", 'w:gz') tar.add('my_folder') #tar the entire folder tar.close() Then I copy it from windows to a linux machine (mapped with samba) using shutil: shutil.copy("mytarball.tar.gz",unix_dir) Then, to extract the

How to control file access in Windows?

冷暖自知 提交于 2019-12-07 19:06:07
问题 Go provides os.Chmod() for setting file and directory permissions. For example, if I want to ensure a file is accessible only to the current user, I can do the following: os.Chmod("somefile.txt", 0600) This works great on Linux but does absolutely nothing on Windows. After digging into the Go source code, I came across its implementation. It seems like S_IWRITE is the only attribute supported. How do I control access to a file or directory on Windows using Go? 回答1: Explanation Windows does

Which file permissions are impacted by Git's core.sharedrepository setting?

点点圈 提交于 2019-12-07 19:03:10
问题 There is a config setting in git that is named core.sharedrepository and which to my understanding impacts the way that git deals with file permissions. My question is what files are meant? Assuming my git repo is at /home/user/project the files in the /home/user/project/.git subfolder? the code files /home/user/project/ but not .git? all files /home/user/project ? the background to my question is that the files in /home/user/project/.git are created world readable -rwxrwxr-- . I would like

com.jcraft.jsch.ChannelSftp.throwStatusError

安稳与你 提交于 2019-12-07 18:50:45
问题 Am trying to create a folder(folderName) and two files(file1.txt,file2.txt) in it.After creating folder and files, am updating its permissions.First update files' permissions then folder's.But when folder permission is getting called for update, exception is thrown.Even exception is thrown permission of the folder and files are updated properly.Please help me to find how I can prevent this Exception. Update1 : channelSftp.chmod(511, folder); //commenting this line, works without exception but

Fixing file permissions after modifying in C++?

和自甴很熟 提交于 2019-12-07 10:23:07
问题 I'm saving my data in the executable file of the program. I copy it to a temporary file, overwrite a part starting at a 'magic string' and rename it to the original. I know this is a bad idea, but I'm doing it just for experimenting. I got everything to work so far, except for that I have to re-enable "Allow running as an executable" each time the file is replaced. What ways are there to solve this? Additional information: I use linux. 回答1: If you want to avoid using system(), you can use

Delphi 2009 classes / components to read/write file permissions

淺唱寂寞╮ 提交于 2019-12-07 07:51:27
问题 Does anyone have a set of classes / components that will work with Delphi 2009 (Unicode) to read and write NTFS file permissions? There was a thing called "NTSet" - but they stopped development at Delphi 2006 about 3 years ago :-( Any other takers?? Thanks! Marc 回答1: JCL has units to deal with file permissions, and they claim D2009 compatibility. 回答2: Colin Wilson's "NT low-level" component set wraps the APIs you need, and supports Delphi 2009 as well as earlier releases. However you may need

File ownership on building docker images

允我心安 提交于 2019-12-07 05:06:32
问题 I want to set up file permissions for files I add to a docker image. I have this simple Dockerfile: FROM ubuntu:utopic WORKDIR /app RUN groupadd -g 1000 baz && useradd -u 1000 -g baz baz -d /app -s /bin/false RUN chown baz:baz /app && chmod g+s /app # want this to be have group baz ADD foo /app/ Building this with docker build -t abc . where there is a foo file in . creates an image. However, the permissions on /app/foo inside is not what I want. docker run abc ls -la total 12 drwxr-xr-x 2