I have a file which stores multiple file paths in the file content, as such: Is there a single line command to loop the file paths in the file and set the permission for each of the file paths chmod 644 <file paths in /var/tmp/sample>? Answer Another way to use xargs:
Tag: file-permissions
Permissions for external drive with different users [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Configuring permissions to folder in ubuntu in order to prevent user’s from removing files of others
I have a folder owned by a group named “wheel”. The ‘ls’ command details for that folder is: (tps = a user, owner of the file, wheel = the group, tsreports = name of the folder) I need to configure the folder permissions in such way that files written into it are still owned by the wheel group, but so
Why can’t I sudo echo a line in /etc/?
I am on centos and I did sudo echo ‘testline’>>/etc/test/test it said -bash: /etc/test/test: Permission denied However, when I do sudo vi /etc/test/test and insert testline and do :wq it writes out fine, why is this happening? Answer You need to wrap the whole statement (including the redirect) into a group so the sudo extends around it. Note: that, too,
What kind of owner and group for these below list of files?
what is the owner and group of this below file? It has 0 and 0 for owner and group. I found those permissions after connecting to a remote server for which we does not have write permissions. How to replicate the same permisions in my development machine? Answer 0:0 is almost always root:root owner and group. The command, cat /etc/group
Strange file permission in docker container (question marks on permission bit and user bit)
I write a Dockerfile and docker-compose.yml to build a custom image which combines beakerx and cling, which contents are below. and Some logs of docker-compose build were But When I run docker-compose up -d, I got PermissionError: [Errno 13] Permission denied: ‘/home/beakerx/.local/share’ error. So I drive into the docker image. Why the permission of ~/.local/share was a lot of question
What is efficient way to ensure bash script variable is valid permission bits?
I’m inexperienced with bash scripts, mostly cobbling things together from google searches. The following simple script creates file foo and changes its permission bits to whatever the script’s $1 is. Can an experienced bash scripter please advise what would be a proper and/or efficient way to ensure that $1 is valid permission bits, i.e. a valid arg1 to chmod? As
lm75 kernel module available in userspace
I’m using the lm75 kernel module to interact with a sensor on a custom board. Every things works fine, I have my device mounted in /sys/bus/i2c/devices/5-0048. But I would like to let the user set the max temp hysteresis so in other words let the user write into the temp_max_hyst file. The permission for this file is read only except
Simulate permissions for non-login user
I want to perform some actions on behalf of some non-login users, such as e.g. www-data or uwsgi. My purpose is to test some permissions, check what dirs they can modify etc etc. Is there a recommended way of going about this, other than creating a shell and password for them and su ? edit: When I try to su
Shell complains about file permissions when creating a config file
I’m not completely sure if I should ask here, over at the Unix forums or somewhere completely different but, here we go. I’m using Packer to create a set of images (running Debian 8) for AWS and GCE, and during this process I want to install HAProxy and set up a config file for it. The image building and package