Questions tagged [chmod]

chmod is used to change the commonly used read, write, and execute permissions on files. It can change these permission bits for the file owner, the file's group owner, and everyone else. It can also change the more esoteric ‘permissions’ (attributes, reall) like set-user-ID, set-group-ID, and sticky bits.

Filter by
Sorted by
Tagged with
0
votes
1answer
34 views

Linux - list of files that *this user* have reading permissions

I got a little homework, to make BASH script. One of subsections is to show all files in this directory, files which this user can read (not read-only) How can I do it properly? I tried a lot of codes,...
10
votes
1answer
2k views

Accidentally ran chmod +x /* - How bad did I just mess up?

I wanted to mark all of the files in the directory I was in as executable, and I ran chmod +x /* because I thought that was the command to mark all the files in the directory you were currently in as ...
0
votes
0answers
24 views

Need rsync options for changing permissions of a folder + files together

I give the user the option to enter 3 digit number for permission say 775 I use ansible where I provide rsync_opts: --chmod:F775 (synchronize module) to change the permission of the transferred file ...
0
votes
0answers
11 views

vsftpd - 550 chmod command failed

Yesterday I installed vsftpd. I managed to properly setup non anonymous chroot/uploads. However I can't manage to get working chmod command. config settings (simplified): local_enable=YES write_enable=...
1
vote
1answer
29 views

Allow file read only through application

I have a file with a secret and a generator application that reads it and generates something similar to a license. There are users on that Linux machine who are allow to use that application. Because ...
0
votes
3answers
86 views

chmod + x.. File fails to open [closed]

When I run the shell script on the terminal, It wouldn't work for some reason. let's say my file name is final_exam.sh, and below are my command. chmod 755 final_exam.sh sh final_exam.sh and it says ...
0
votes
0answers
19 views

accidentally changed permissions of usr directory in the VM

I am a complete newbie and I accidentally did $chmod 444 /usr and exited the terminal. Now, I am unable to even login to the VM. Is there any way this can be resolved?
0
votes
0answers
28 views

Root cannot append to file in /tmp [duplicate]

As root run: cd /tmp seq 10 > foo chmod 666 foo seq 10 >> foo chown daemon foo seq 10 >> foo This gives: -bash: foo: Permission denied It is clear that it is due to /tmp's special ...
1
vote
0answers
24 views

SGID Bit prevents from changing to that directory

I have a problem which makes no sense in my mind. Could you please give me a hint what im doing wrong? I have a folder called files which has those rights: # ls -lart | grep files drwxrws---+ 19 ...
0
votes
1answer
16 views

Setting permissions on files and folder - is folder perms inheritance always implicit?

Objective: Creating a folder on the root, chown to group and add users to group - but users get too wide permissions! Consider the following: # as root # we need a user group groupadd team1 # we ...
1
vote
0answers
17 views

tar / pack `a-r` “unreadable” files

If there are files unreadable even to the owner (chmod a-r), tar and other tools will throw errors when creating an archive. However, these files could be updated with chmod u+r before archiving, and ...
7
votes
2answers
774 views

Creating a new user breaking existing permissions

I have a machine running Ubuntu with a SSH config file in ~/.ssh/config with the following permissions (default when creating a new file) -rw-rw-r-- 1 dev dev 75 Oct 26 20:13 config After creating ...
0
votes
2answers
38 views

chmod file with read permission but not delete , write and execute

I know i can set read , write and execute permission to a file with chmod but can i take away the permission to delete, write and execute?
0
votes
1answer
26 views

How to copy a directory hierarchy that lacks read permissions, even for root?

I want to copy (tar and zip) a directory hierarchy that doesn't even have read permissions for root enabled - WITHOUT changing the permissions (it is part of the system and I assume they have these ...
4
votes
3answers
2k views

Confused how any user can chmod a file with sudo

I am new to Linux, so bear with me for my lack of understanding. Imagine there are 2 users in my Linux installation, say A and B. User A creates a folder FolderA and adds some files inside this folder....
0
votes
1answer
31 views

How to allow few specified users only to edit a file?

I have a file that I want only a selected group of users (approvers) to have permission to modify. The file should be read-only to the rest of the users (reviewers). Is it possible to do this in a ...
-1
votes
1answer
53 views

Can an admin undo the limitations of a chmod 700?

Please help me understand how Linux works in this respect. I set up a samba fileshare on a raspberry pi and created a user account as well as a directory for a new user. I then used chown and chmod ...
0
votes
1answer
74 views

MacOS: chmod --reference=<reference file> <file> returns chmod: illegal option — -

I'm learning how to change the permissions of files and want to copy the permissions of one file to another using the chmod function however it keeps returning chmod: illegal option -- - Any help ...
0
votes
1answer
17 views

How is it possible to set a directory permission, so the group can both read and write files in it? (Regardless who created a file)

I created a directory, which is owned by the www-data group. I would like to make the files in it writeable by the members of the group, no matter who created the file. My username is pi. I tried it ...
0
votes
1answer
99 views

Permission denied - www-data group can't write

I'm running on a Debian-98-stretch-64-LAMP and I'm trying to give my user (admin) the permission to the www-data group that I created. I already invited / added my User into the www-data group but the ...
0
votes
0answers
826 views

chmod: changing permissions of directory which is Read-only file system

Locate the directory's importfromwp mount point. df /home/debian/mydoc/source/importfromwp Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdb3 30719996 434000 30285996 2% /...
0
votes
1answer
243 views

chmod returns: invalid mode:

I am trying to run the following command from Oracle ZFS docs and it fails: $ chmod A+user:myusr:add_subdirectory:fd:allow /tank chmod: invalid mode: ‘A+user:myusr:add_subdirectory:fd:allow’ Try '...
0
votes
1answer
34 views

Giving a home directory a specific “bit set” using chmod [duplicate]

the finger man page says I need to use chmod to give the home directory the "other-users-execute bit set", in order to restrict finger requests to only those that original from the local ...
0
votes
1answer
31 views

Get filename and path where curl -o saved the output

I'm trying to create a new command by downloading a gist from Github. I need to add an +x permission to the downloaded file. I can do it like this. sudo curl -s $URL -o /usr/bin/hello && sudo ...
1
vote
1answer
74 views

Make every file in a directory executable by default?

I have a directory in which I am storing all my shell scripts and I would like new files to be made executable by default so that I don't have to go chmod u+x [file] everytime. Is there a way to make ...
0
votes
1answer
30 views

Zsh cannot be customized

I have trouble trying to customize my z shell with OMZ framework and some other plugins. I am in my zsh, but when I tried to echo $ZSH_THEME, nothing appears. I am suspecting that the problem has to ...
-5
votes
1answer
313 views

chmod 777 Error cannot access operation not permitted

While giving chmod -R 777 dvwa I get the following error: root@localhost:/var/www/html # chmod -R 777 dvwa chmod: cannot access 'dvwa/.git/objects/pack/.l2s.tmp_idx_oywRqJ0001': Operation not ...
0
votes
1answer
20 views

Exe file creating directories with just no right permissions to folder

I have a script that runs in aws which basically pulls data feeds via api then creates a folder which it then dumps a csv file into. Right now it is supposed to name the directory based on its name. ...
0
votes
0answers
160 views

Why chmod does not save the permissions after a reboot?

When I run command sudo chmod o+w /home /home permissions change to: drwxr-xrwx 3 root root 4096 May 30 11:40 home When I reboot, it get back to: drwxr-xr-x 3 root root 4096 May 30 ...
0
votes
1answer
37 views

chmod command run within inotifywait doesn't work

I have the following bash script (which is saved as ~/fix-perms.sh): #!/usr/bin/env bash inotifywait -d -r -e close_write -o /dev/stdout ~/testdir | while read path event file; do sudo chown user:...
0
votes
0answers
32 views

Nautilus permissions works well.But chmod not working as expected

I have seen this questions across many sites,But this is not the duplicate of those Questions.The scenario here is I already have windows 7 which has 500 GB of HDD,so I unallocated 80 GB from D:Drive ...
0
votes
1answer
30 views

Single user box, do user groups matter?

I have a single user box that I have setup as a home server. I'm the only one that ever logs into it, and will be the only one to ever log into it. I tend to chmod 755 for most files/directories and ...
1
vote
1answer
283 views

Block Outbound SSH Connection on Ubuntu for all ports except 22

I can see on my server where SSH outbound connections are being created in high amount. Will it be possible to block the ssh command for all the users except one specific user. Or Will it be ...
0
votes
1answer
657 views

What's the difference between 'chmod g+s' and 'chmod +s'

My user is already in 'wheel' group of CentOS and the 'ping' command doesn't work: ping: socket: Operation not permitted A guide here about using 'chmod +s' for 'ping': https://github.com/MichaIng/...
0
votes
0answers
16 views

CentOS 7 Directory Permissions Not Working As Expected [duplicate]

As shown below, jamal is giving every body full access to his temp1 directory in his CentOS 7 home directory. [jamal@localhost ~]$ mkdir temp1 [jamal@localhost ~]$ [jamal@localhost ~]$ chmod a+rwx ...
0
votes
1answer
21 views

Group permission denied

Good time of day, my dear friends. I've got a user "http" with group "http", a dir "drupal-8.8.5" inside /home/yasuostormrage with 777 permissions for yasuostormrage:http, but there's a problem: user ...
0
votes
1answer
34 views

I did something to my bashrc or something in UNIX, not listed in sudoers file anymore and can not get access to directories

I am using REDHAT/CENTOS 6.5. I used to have access to directories, but now when I try to go into them after I rebooted by UNIX, it tells me that permission is denied. Using stat command on these ...
0
votes
1answer
69 views

auditd / auditctl: Are chown and chmod “write” -w type of an operation?

Are chown and chmod “write” -w type of an operation? I'm using auditd to watch folder permissions. There are different options read, write, execute, attributes. I just want to watch chmod or chown ...
0
votes
1answer
82 views

How to temporarily leave fakeroot environment

To run some tests, I want to revoke write permissions for a folder. This is a minimal example: $ mkdir test $ chmod a-w test $ touch test/test || printf '%s\n' "write permissions successfully revoked"...
0
votes
1answer
50 views

setfacl doesn't apply permissions recursively

On my RHEL 7.7 system, I am trying to allow user foo read and execute (no write) to everything under the /var/log/ directory, to include files, sub-directories, and files within those sub-directories. ...
0
votes
1answer
182 views

What does chmod -N do?

In the DropBox reinstall instructions for Mac there was the line sudo chmod -N ~. I looked for the -N option but I didn't find anything about it. Could someone explain what this option means ...
0
votes
1answer
150 views

Owner not able to write log file

I'm working on a python script, I created a file in /var/log/ folder with 664 permissions python script is not able to write logs to the file created, IDK why... since file owner is ubuntu(aws's ...
0
votes
1answer
22 views

Can't delete file - only permissions change - why?

I am trying to delete a file and while it works fine through the shell, when I call my script from another program, instead of deleting the file, it merely changes the permissions to something odd: $ ...
0
votes
1answer
215 views

Solution for sudo chmod 700 /bin && sudo chmod 700 /bin

I accidentally run sudo chmod 700 /bin && sudo chmod 700 /bin Then I couldn't run sudo or any commands again please is there a solution?
0
votes
0answers
43 views

Make Python3 script callable from everywhere without making it an executable

I've got a folder: /root/Desktop/commands/ This folder contains many Python scripts that should be callable from anywhere from the terminal. How can I make it, that I say once, that all scripts in ...
1
vote
0answers
26 views

Why do files become 'invisible' when execution permissions are revoked? [duplicate]

This is somewhat related to my, now resolved, question here here. When I ran chmod 666 on group of files they stopped showing up in the GUI (thunar) but I could see them when I ran ls. When I found ...
0
votes
1answer
62 views

Files missing in GUI after recursive chmod or chown

I was trying to set permissions on all of the files in a removable hard disk. I had tried chown and chmod on the disk address (i.e. /dev/sdb) but I still couldn't move files as a user. Then I tried to ...
9
votes
2answers
1k views

Is it possible to forbid a specific user from executing files on /usr/bin without changing all files permission to 750?

I understand the concept of managing permissions on Linux with chmod using the first digit as the user, the second as the group and the third as other users as described on this answer in ...
4
votes
4answers
554 views

Permissions on folders vs files?

if I have a folder that's restricted with say 600, thus no access for group or everyone, but the folder contains files with 777, would this be safe? Are there any work-arounds to access the 777 file ...
3
votes
2answers
419 views

Recursive chmod to 644 where current permission equals 755

I copied a project directory to a portable hard disk, wiped my laptop and copied the project back, but now git reports loads of changes due to files that previously had 644 permission changing to 755. ...

1
2 3 4 5
11