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
0answers
28 views

chmod equal sign isn't working appropriately or I misunderstand it? [on hold]

Does the equal sign in chmod command revokes unmentioned permissions? for example, the command chmod u=r file1.txt does it yield a permission -r-------- ? or it keeps the u and g permissions as they ...
0
votes
0answers
29 views

Can not access to sudo [duplicate]

I ran the command: sudo chmod -R 777 / And now I have that: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set Thank you for help!
-1
votes
1answer
23 views

How to change permissions of all the files in my directory?

I used a script to install Hadoop /opt/hadoop-3.2.0$ ll total 216 drwxr-xr-x 10 yarn hadoop 4096 јул 9 08:05 ./ drwxr-xr-x 9 root root 4096 јул 9 07:42 ../ drwxr-xr-x 2 yarn hadoop 4096 ...
2
votes
2answers
32 views

Can't create directory in directory owned by group

I have a group called homeperms on an Ubuntu system, with a few users: $ cat /etc/group | grep "homeperms" homeperms:x:1004:jorik,tim.wijma,vanveenjorik,jorik_c And I've done $ sudo chgrp -R ...
0
votes
1answer
25 views

Cannot change file/folder permission on Linux running on VMware

I am using Linux on a VMware on Windows and added a second HDD device today. However, each file or any dictionary that is created on the new device gets executable permissions which are not removable (...
0
votes
0answers
11 views

SetGID on folder with Active Directory users

I have a directory which staff are allowed to sftp into on an Ubuntu 18.04 server. The directory is root:www-data owned (it's a web server) and I've set chmod +t and chmod g+s so data cannot be ...
0
votes
0answers
25 views

Chromeos Linux Beta

I am attempting to install Krita on my chromebook. I have 'turned on' linux beta and chromeos prompts me that 'Shared folders are available in Linux at /mnt/chromeos...' Issue debian@penguin:/mnt/...
0
votes
0answers
22 views

How do I change permissions for only the folder and no subfolders or files contained therein?

I need to change permissions for a root folder, then change them straight back. All permissions for everything else should stay the same. So, I need to find out current permissions change them to ...
0
votes
1answer
32 views

Set File Permissions to Default from Umask

https://geek-university.com/linux/set-the-default-permissions-for-newly-created-files/ So I want my umask (command) which in this case is 0002 to be subtracted (bitwise) from 666 for files and 777 ...
1
vote
0answers
42 views

Why can I change permissions for a file with 000 permissions? [duplicate]

I have the following file: ------- 1 user user 0 may 26 14:07 a.tar.gz When I execute chmod 777 a.tar.gz, the file permissions change. Why does this happen, and how can I block it?
0
votes
0answers
26 views

Permission setup for two different groups of users in the same directory

I need to find the optimal permissions layout for the following use case: There is a AIX machine used for collaborating on software projects. Each project has its own sub-directory. For each project,...
0
votes
2answers
57 views

How to change file permission of shell files

I have a directory where a lot of bash scripts or .sh files exist. I want to change their permissions to 770 (rwxrwx---) with the chmod command. How can I accomplish that?
0
votes
0answers
22 views

Can't read directory from owner with 700 permissions [duplicate]

I have directory with rwx permission for current user, but he's unable to access it, why? : sudo ls /usr/data/user-data -lad drwx------ 9 andrew andrew 4096 May 17 11:13 /usr/data/user-data : ...
0
votes
0answers
19 views

What does @ symbol mean in file permission? [duplicate]

I started encountering the following problem when I was trying to delete a set of files when I started seeing the following error on my MAC with macOs, Mojave. "The operation can’t be completed ...
1
vote
2answers
35 views

Can't open file even though directory/file is owned by user and in group

I am having a really tough time understand user/group permissions. I have spent hours reading and trying things. Here is what I have: Directories Permissions Input 1: ls -lhd Output 1: /var/log: ...
1
vote
2answers
63 views

All files or folders copied from an NTFS drive are with drwxrwxrwx rights. Can I correct this easily?

I went from Windows 7 to Debian 9, copying most of the files I'm using for my projects from an NTFS drive. I see that : all the folders I have copied are now with rights drwxrwxrwx instead of drwxr-...
0
votes
1answer
151 views

Bash script returns permission denied message

When I run this script: #!/bin/bash # internet-status.sh # ================== now=$(date +%F) cmd_output=$(nc -dzvw1 8.8.8.8 443 2>&1) logfile_string=$("[$now] $cmd_output") logfile=$("$HOME/...
1
vote
1answer
51 views

stop force save on a file with read only permission

I have a script file that is currently in sudoers, and for security I want this file to be read only... so I issued the following chmod: chmod 555 test.sh Now the permissions on this file are -r-xr-...
0
votes
2answers
169 views

Website cannot write to files or create directories

I've been trying to install TeemIP for about 6+ months now and I've never been able to figure out this issue on Centos7. The error I get is the following: The directory '/var/www/teemip/public_html/...
19
votes
2answers
768 views

What does chmod -u do?

By accident I ran chmod -u filename and it removed all of the permissions I had on filename. The man page does not reference a -u option. Experimenting I was able to conclude that it removes not all ...
1
vote
0answers
76 views

Does Access Control lists override group or owner permissions?

I came across the following task: Add 3 new users - alice, bob, charles Create a new group - marketing - and add alice, bob and charles to that group Create a directory - /marketing - whose owner ...
7
votes
2answers
572 views

Can't remove a file with file mode bits a+rw

I have a file with the following file mode bits (a+rw): [0] mypc<johndoe>:~>sudo touch /tmp/test [0] mypc<johndoe>:~>sudo chmod a+rw /tmp/test [0] mypc<johndoe>:~>ls -l ...
1
vote
1answer
61 views

chmod without changing stat (atime) of file

i would like to be able to chmod a directory structure without changing the atime of those (files and) directories. if i start out with a file structure like $ tree test/ test/ ├── test1.txt └── ...
1
vote
1answer
62 views

Can only write as root although user seems to have full permissions [duplicate]

I am having trouble writing to a samba share from a linux client (a Windows client can read and write just fine). According to ls -la run from the linux client, I should have full permissions: james@...
2
votes
2answers
121 views

sudo never works. I have no permissions on my computer [closed]

I want to reinstall Linux Mint..... Many commands start with sudo and then apt-get or whatever. I am never able to get past this. Typical attempt: john@john-AY022AA-ABA-p6330f:~$ sudo apt-get ...
0
votes
2answers
179 views

What happens if I change chmod permissions to rrr [closed]

I want to try to change /bin/chmod permissions file to rrr but afraid to loose my machine. What happens next if I change them?
0
votes
1answer
55 views

nosuid doesn't prevent chmod u+s

I follow a tutorial to secure my /etc/fstab file. This is a certain part about /var and /tmp UUID=XXXX-XXXX-XXXX /var ext4 defaults,nodev,nosuid,noexec 1 2 UUID=ZZZZ-ZZZZ-ZZZZ /tmp ext4 defaults,...
11
votes
2answers
1k views

Use chmod command selectively

I want to set 755 permission on all files and sub-directories under a specific directory, but I want to execute chmod 755 only for those components which does not have 755 permission. find /...
1
vote
1answer
314 views

Man page for file permission numbers

Is there a man page for the file permission numbers? I'm specifically talking about r = 4 w = 2 x = 1 I can never remember them and I have to google it every time I need to set permissions besides ...
3
votes
1answer
547 views

Why is /tmp mounted with permissions 0755 when fstab has 1777?

For /tmp in /etc/fstab, I have mode=1777, but after a reboot, the permissions on /tmp are 0755. Another directory /var/tmp is configured in exactly the same way but does not have this problem (see ...
1
vote
2answers
212 views

ls -I myExecutable is listing the rest of the dir files instead of showing info about the file

Working on Raspian, after compiling using make, I do a ls -I myFile in order to see the permissions of the file and if it is marked as executable as it should and instead of getting something like ...
0
votes
1answer
34 views

What happens if we, recursively, change folder permissions after changing files in it?

What will these below commands actually do? chmod 777 /yoda/htdocs/cups/logs/* chmod -R -f 777 /yoda/htdocs/cups/logs/ When I check the file permissions in ..../logs folder, they are showing as -...
-1
votes
1answer
2k views

chmod all files in a directory [duplicate]

How do I change all files (different types including .sh, .py, and other executable files) in a known directory to permission 775 without listing all of the file names? I mean "all" of them in that ...
0
votes
1answer
42 views

Solaris difference between 's' and 'l' in permissions

On a Solaris 11 machine, when I execute chmod 2000 myfile, I get l instead of S or s: touch myfile && chmod 2000 myfile && ls -l myfile ------l---. 1 pydoge pydoge 0 Oct 16 12:35 ...
-4
votes
2answers
50 views

Using octal method,how do I type the exact command I would use to make test.txt have the following permissions dr-xr-x— [duplicate]

Using octal method,type the exact command you would use to make test.txt have the following permissions dr-xr-x---
0
votes
1answer
725 views

can not set user write permissions to file in SMB mounted directory [duplicate]

I have mounted a Windows 10 directory so I can edit some files on my Windownz machine. sudo mount -t cifds //W10/Users ~/public/ -o username=bobby When checking the directories they all have the ...
4
votes
2answers
754 views

Permissions denied on files despite 777 mode

I am getting a permission denied error on CentOS 6.10 64 bit Kindly note that the "#" indicates a Root Level User prompt. # cd /tmp # chmod 777 file* # /bin/ls -l file* -rwxrwxrwx 1 apache apache ...
5
votes
5answers
408 views

Removing and adding permission using numerical notation on the same line

I'm having some trouble trying to remove write permission from the owning group (g), and to add read permission to others (o) at the same time. How would I remove some permission from the owning ...
2
votes
1answer
48 views

Can't access folder with group permissions

It seems that I can't access a folder on which I put 777 group permissions, even though I am a member of the folder's group. Error detail : 10:57 ~ $ ls -l d---rwx--- 2 laurent www-data 4096 août ...
2
votes
1answer
64 views

why while loop works from terminal if ld-2.17.so have no executable permission?

In my previous question, executed "chmod 666 ld-2.17.so" - how can i recover? I asked if I change ld-2.17.so permission to read, how can I recover it back, since it won't allow me to execute ...
-1
votes
1answer
32 views

why doesn't setfacl give executable permission?

I ran sudo setfacl -d -m g::rwx /tmp then went into /tmp and created a file and looked at its permissions: -rw-rw-rw-. 1 jm wheel 0 Aug 24 10:26 test_file then I ran sudo chmod g+rwx ...
0
votes
1answer
193 views

Change File Permission at run time

I have two users in a group. Users: 1) apache 2) data Group 1) apache I have three directories. The directory structure of that three directories are like below. drwxrwx--- 10 data ...
0
votes
1answer
236 views

How to add sticky bit to a directory in exFAT?

I get this error from Homebrew when trying to build an application on MacOS 10.10.5, on an exFAT filesystem Error: parent directory is world writable but not sticky I use this command to enable ...
0
votes
1answer
36 views

Can chmod on a directory without --recursive change who can read a file within that directory? [duplicate]

Based on the suggested duplicate, let me reformulate my question: If chmod 0660 path/to/folder is run, and user A isn't in the relevant group, could user A still read /path/to/folder/file.txt if that ...
2
votes
1answer
104 views

How to check if there are “other” permissions in home directories

Right now, I have a script that runs daily that chmod's the home directories, removing all "other" permissions from the directories and the "group" write permission. See below. #Removing all other ...
0
votes
1answer
46 views

Permissions Based on Lowest Level

My user account, samjaques, belongs to a group sams. I have two folders, both in the sams group. Folder 1 is owned by root, Folder 2 by samjaques. Both have permissions set as ---rwx---. From the ...
0
votes
0answers
132 views

How do I launch Phantombot Jar file on Linux Mint 19 Tara?

So I am following some steps to try and launch this Jar file. I am a Linux Mint 19 user of only a week or so, I used it once before but briefly. $ chmod +x launch.sh I am trying to launch this ...
5
votes
3answers
3k views

How to create a file that only sudo can read?

I'd like to have a file on my computer that stores a particular token (rather than having them just exported to the shell env). As such, I'd like that the token can only be read by sudo, so access to ...
0
votes
1answer
261 views

Give read write-only access to specific folder?

I created an LDAP group rcars. I also created a directory rcars. How can I set permission so that only rcars group can read/write?
1
vote
1answer
654 views

Granting read/execute permission for 'other users' in a directory tree

There is the following directory tree in several of my Linux boxes: /dir1/dir2/dir3/dir4/target Each of the dir[1-4] directories have several directories under them and all these directories (and ...