rsync deploy and file/directories permissions
Try it like this : –chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r It worked for me.
Try it like this : –chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r It worked for me.
I figured out: the flag –chmod is a new feature from Docker Buildkit, so it is necessary to run the build enabling it via: DOCKER_BUILDKIT=1 docker build ./ However, it is really not clear why Docker swallows the –chmod option without any error or warn about the non-existing option 😕.
Directories need the execute permission set in order to see their contents. From http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm You can think of read and execute on directories this way: directories are data files that hold two pieces of information for each file within, the file’s name and it’s inode number. Read permission is needed to access the names of … Read more
chmod 600 filename will do it; or chmod 700 if it is an executable. Another way that is less cryptic is: chmod go-rwx filename The “g” is for group The “o” is for others The “-” is for removing permissions The “r” is for read-permission The “w” is for write-permission The “x” is for execute … Read more
According to its sourcecode /lib/fs.js on line 508: fs.chmodSync = function(path, mode) { return binding.chmod(pathModule._makeLong(path), modeNum(mode)); }; and line 203: function modeNum(m, def) { switch (typeof m) { case ‘number’: return m; case ‘string’: return parseInt(m, 8); default: if (def) { return modeNum(def); } else { return undefined; } } } it takes either an … Read more
Use chown to change ownership and chmod to change rights. use the -R option to apply the rights for all files inside of a directory too. Note that both these commands just work for directories too. The -R option makes them also change the permissions for all files and directories inside of the directory. For … Read more
You should have a look at the –reference option for chmod: chmod –reference version2/somefile version1/somefile Apply find and xargs in a fitting manner and you should be fine, i.e. something like ~/version2$ find . -type f | xargs -I {} chmod –reference {} ../version1/{} This even works recursively, and is robust against missing files in … Read more
This should work just fine: # sudo mkdir /usr/local/var/postgres # sudo chmod 775 /usr/local/var/postgres # sudo chown construct /usr/local/var/postgres # initdb /usr/local/var/postgres use your username in place of construct. So, if your computer username is WDurant, the code will be: # sudo chown $(whoami) /usr/local/var/postgres
You should be able to do: git update-index –chmod=(+|-)x <file> to adjust the executable bit stored in the index. You can then commit this separately from any changes to the files content.
chmod can actually do this itself; the X symbolic permission means “execute, if it makes sense” which generally means on directories but not files. So, you can use: chmod -R u=rwX,go=rX /path/to/htdocs The only potential problem is that if any of the plain files already have execute set, chmod assumes it’s intentional and keeps it. … Read more