file-permissions

An error occurred loading a configuration file: Failed to start monitoring changes to '\\share'

非 Y 不嫁゛ 提交于 2019-12-07 02:10:51
问题 I had this same problem last week, which resolved itself after I enabled impersonation. Now, I've moved this box to a different location and am now receiving it again. However, this time it is much less descriptive. The only error I'm receiving is: An error occurred loading a configuration file: Failed to start monitoring changes to '\\share' I've changed both the web server and file server's local administrator password to what it should be and also the power user that connects between. I've

Multer, Node, EACCES error on C9.io

自古美人都是妖i 提交于 2019-12-06 21:44:33
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 same error. The code I have is server.js app.use('/uploads', express.static(__dirname + '/public/uploads

In C on Unix, how can a process tell what permissions it has to a file without opening it?

馋奶兔 提交于 2019-12-06 15:26:05
I can use stat() to figure out what permissions the owner, group, or others have and I can use geteuid() and getpwuid() to get the user name of the process. I'm not quite sure how to get the groups a user belongs to without a system call though. Even knowing how to get the groups, it seems like a lot of work to integrate all of this information. Is there an easier way? The access() POSIX function can check the permissions without opening it. However, it needs to a syscall. The access() function shall check the file named by the pathname pointed to by the path argument for accessibility

How to make a file read-write to a program but read-only/no access to non-admin users in Windows?

半城伤御伤魂 提交于 2019-12-06 14:50:35
I would like to do the following: Non-admin users can run my program without UAC prompt. The program have full access to a particular file. Outside of the program, the user have read-only or no access to the file. They cannot modify the file. They can only modify it through the program. Is it possible? Harry Johnston You'll need to split your code into two parts; the user interface, which runs in the user's context, and a service, which runs with admin privilege. If you're programming in C, start with the MSDN library section on services for a general overview as well as the authoritative

get fd from file pointer in kernel space

眉间皱痕 提交于 2019-12-06 14:10:33
Given a struct file, is it possible to get the associated file descriptor in linux kernel space? I am trying to change permissions using either sys_chmod or sys_fchmod. One takes a file descriptor the other expects a filename from user space. I can figure out how to get the filename but how would I cast it to a user space pointer? Thanks The function you're after is chmod_common : static int chmod_common(struct path *path, umode_t mode) Which takes a path and the mode you want to set. Unfortunately, as you noticed, it's static and obviously not exported. So you could go multiple ways:

setgid bit not preserved by git on new directory in `.git` folder?

好久不见. 提交于 2019-12-06 11:39:06
问题 I have a bare git repository setup for user fred : /home/fred/foo.git I have set the group of every file in foo.git to bar : $ chown -R fred:bar /home/fred/foo.git (Note that fred is not a member of group bar ) And I have set the setgid bit on for every directory in foo.git : $ find foo.git -type d -print0 | xargs -0 chmod g+s However when fred commits to the git repository, the group is not preserved in some files. Specifically in the objects directory I see: foo.git/objects: drwxrws--- 46

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

浪子不回头ぞ 提交于 2019-12-06 10:43:15
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 to have all files only accessible to either the specific user or at least a groupid member The setting

Why does `git pull` fail on my webserver?

瘦欲@ 提交于 2019-12-06 10:40:54
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 for newly added file. It shows as if its pulled: ... 18bb8ac..c9c1e40 master -> origin/master Updating

Why can't I open/write from a serial port on Android?

风流意气都作罢 提交于 2019-12-06 10:13:12
问题 I have written an Android app which runs on a custom kernel on Android 4.4 Kitkat device, which uses the Android Serial Port API (https://code.google.com/p/android-serialport-api/) in order to open the serial port "/dev/ttyACM0" which is the port associated with my serial device. The port has the proper "666" permissions (crw-rw-rw), and the app itself even has the WRITE_EXTERNAL_STORAGE" permission. However, even though the permissions appear correct, when my app tries to open said serial

php write file and set permission

ぐ巨炮叔叔 提交于 2019-12-06 08:51:17
I'm trying to create a php file which I can edit straight away without manually set the permissions. I'm trying this... <?php $var = '<?php $mycontent = new Content(); echo $mycontent->block($p_name);?>'; $myFile = "testFile.php"; $fh = fopen($myFile, 'w+') or die("can't open file"); $stringData = $var; fwrite($fh, $stringData); fclose($fh); ?> ...it creates the file, but when I try to edit the file in my IDE it won't let me of course. I have to manually set the permission of the file created. Is there any way I can create the file and have the permission already set? Thanks in advance Mauro