file-permissions

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

不问归期 提交于 2019-12-04 17:42:56
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 fred bar 4096 Apr 7 23:43 . drwxrws--- 7 fred bar 4096 Apr 6 17:12 .. drwxrws--- 2 fred bar 4096 Apr 6

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

拟墨画扇 提交于 2019-12-04 17:28:16
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 port using the library, it fails. In my java code, if I try to do a "device.canWrite()" it returns

How to assign execute permission to a .sh file in windows to be executed in linux

萝らか妹 提交于 2019-12-04 14:57:38
问题 Here is my problem, In Windows I am making a zip file in which there is a text .sh file which is supposed to be executed in Linux. The user on the other end opens the zip file in Linux and tries to execute the .sh file but the execute permission is gone. So the user has to do it manually ( like explained here:add execute permission. How can I in Windows make the .sh executable and add it to a zip file so that when the zip file opens in linux the .sh file still retains its execute permission (

git ignore filemode config isn't working

拥有回忆 提交于 2019-12-04 14:01:58
I am using gitolite git server on a ubuntu linux server. I used a hook that will be called on every push and will update a server's directory(which include live site's source code). Now, whenever I change something on my local pc and push the changes to server, the hook is being called and the pull request are being executed fine. But, problem is, the files which were updated, are now having changed permission. Like: rwxrwxr_x (before) rwx_____x (After) After few searches, I did came up with this solution . I did tried it with both my global git config and repository specific config settings.

Android file permissions on Android 6.0

泪湿孤枕 提交于 2019-12-04 13:05:29
I want to list files and directories under "/proc" in Android. When running as my application process, many files are not readable. If I list the directory as the shell user I get the following output: shell@flounder:/ $ whoami shell shell@flounder:/ $ /system/bin/toolbox ls -l /proc dr-xr-xr-x root root 2015-09-12 03:30 1 dr-xr-xr-x root root 2015-09-12 03:31 10 dr-xr-xr-x root root 2015-09-12 03:31 101 dr-xr-xr-x shell shell 2015-09-15 03:24 10196 dr-xr-xr-x root root 2015-09-12 03:31 102 dr-xr-xr-x root root 2015-09-12 03:31 103 dr-xr-xr-x root root 2015-09-12 03:31 104 dr-xr-xr-x u0_a15 u0

Nginx/Django File Upload Permissions

你。 提交于 2019-12-04 11:08:22
Today I noticed that whenever I upload a file through my Django site the file is uploaded with the file permissions 0600 meaning whenever a non root user wants to view the file (nginx) a 403 is shown. This only started happening today from what I can tell. I have checked both the file_upload_permissions and file_upload_directory_permissions in the Django settings file and they are both set to 0644. I haven't done any Linux/Django updates recently so that shouldn't be the cause, any help would be greatly appreciated. Thanks, Sam If you have recently switched to Python 3, please take a look at

Change permissions of folders

萝らか妹 提交于 2019-12-04 09:48:48
I want to change some folder permissions (set to Read-Only) to ReadWriteExecute! I wrote this code, but the folder permission is still Read-Only: private void ChangePermissions(string folder) { string userName = Environment.UserName; FileSystemAccessRule accessRule = new FileSystemAccessRule(userName, FileSystemRights.FullControl, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Allow); DirectoryInfo directoryInfo = new DirectoryInfo(folder); DirectorySecurity directorySec = directoryInfo.GetAccessControl(); directorySec.AddAccessRule

Git changes the permissions on a single file unexplainably

[亡魂溺海] 提交于 2019-12-04 08:57:10
I am the only person involved with this git project. Every time I edit files at my local Ubuntu repository, then push to Bitbucket and pull to my production repository, git changes the edited files to -rwxrwxr-x 775. Apache doesn't like this. Local system: git version 1.8.1.2 on Ubuntu Linux Production system: git version 1.7.12 on CentOS/Red Hat Linux When I fix permissions to 755, then do git diff or git diff -p It shows nothing. At my local repository, the permissions are 755 and the files are all owned by haws. At my production repository, all other permissions stay at 755, and all files

Ansible - Mode 755 for directories and 644 for files recursively

泄露秘密 提交于 2019-12-04 07:48:25
问题 I'd like to allow anyone to list and read all files in my directory tree, but I don't want to make the files executable : dir \subdir1 file1 \subdir2 file2 ... \subdirX fileX The following task makes my directories and files readable, but it makes all the files executable as well: - name: Make my directory tree readable file: path: dir mode: 0755 recurse: yes On the other hand, if I choose mode 0644, then all my files are not executable, but I'm not able to list my directories. Is it possible

How to read the mode field of git-ls-tree's output

a 夏天 提交于 2019-12-04 02:54:49
$ git ls-tree fb3a8bdd0ce 100644 blob 63c918c667fa005ff12ad89437f2fdc80926e21c .gitignore 100644 blob 5529b198e8d14decbe4ad99db3f7fb632de0439d .mailmap 100644 blob 6ff87c4664981e4397625791c8ea3bbb5f2279a3 COPYING 040000 tree 2fb783e477100ce076f6bf57e4a6f026013dc745 Documentation 100755 blob 3c0032cec592a765692234f1cba47dfdcc3a9200 GIT-VERSION-GEN 100644 blob 289b046a443c0647624607d471289b2c7dcd470b INSTALL 100644 blob 4eb463797adc693dc168b926b6932ff53f17d0b1 Makefile 100644 blob 548142c327a6790ff8821d67c2ee1eff7a656b52 README ... I know the last 3 oct digits are file mode, but what are the