Questions tagged [chmod]

The `chmod` command is used to adjust file permissions to read, write and execute for the owner, group and others.

Filter by
Sorted by
Tagged with
5 votes
1 answer
1k views

How to chmod files that have a specific set of permissions

I want to find all files in a folder that have -rw-r----- (640? is that the right code?) permissions, and change them all to have -rw-rw-rw- instead. How do I do this, with chmod? I know I could do ...
Max Williams's user avatar
2 votes
2 answers
1k views

Untrusted Application .desktop (solutions given haven't worked)

So I recently installed Quartus II Lite 18.1 on my Ubuntu. After a smooth installation through terminal (I forgot to click launch application while I was still in root). Now the desktop icon appears ...
Sayangdipto Chakraborty's user avatar
0 votes
1 answer
500 views

change owner and read write permission of file [duplicate]

I have one file with root ownership, -rw-r--r-- 1 root staff 92229 Feb 6 10:51 oneFile -rw-rw----@ 1 John staff 5242880 Feb 7 00:14 anotherFile How can I change oneFile ownership ...
Leem's user avatar
  • 111
91 votes
4 answers
122k views

WSL Ubuntu Distro | How to solve `Operation not permitted` on cloning repository

I am running Ubuntu 18.04, as a Subsystem for Windows. I have done this in mutliple PCs and never had this problem. I try to to git clone <repo>, and I get this: Cloning into '<repo>'... ...
Dimitris Efst's user avatar
1 vote
1 answer
576 views

Sudo not working for chmod

I am trying to install a piece of software on a clean AWS instance. It requires changing permissions on a bunch of files. The first batch goes ok after sudo chmod 644 config.local.php sudo chmod -...
QbaQBar's user avatar
  • 11
0 votes
1 answer
1k views

Ubuntu set permissions for future created files

I create a file host.txt and add some data I debug PHP for 3 hours, only to know that PHP couldn't write to the file. How can I set default 775 permissions on all files that are created from now on ...
Born vs. Me's user avatar
1 vote
1 answer
4k views

chmod: changing permissions of file system

I'm having problems to execute file in my VMware folder, I tried changing permissions, but it does not change but give this error: chmod: changing permissions of <filename> Read-only file ...
user3768971's user avatar
2 votes
3 answers
11k views

How to solve this error `sudo: /usr/local/bin/sudo must be owned by uid 0 and have the setuid bit set` without reinstalling ubuntu?

TLDR: I am running Ubuntu 18.04 with i3 and I messed up my permissions. Whenever I run a command with sudo, I get this error message, sudo: /usr/local/bin/sudo must be owned by uid 0 and have the ...
ByteByByte's user avatar
0 votes
1 answer
750 views

I am not able to write on a network drive (Hosted with samba) using a php program. Why?

I have a network drive service hosted on Samba(Whose settings I can't change) when I mount it on my ubuntu pc using mount.cifs I am able to read write it's content. To make a directory or file there ...
Shaleen Jain's user avatar
0 votes
1 answer
163 views

How can a new user be given write/chmod permissions to a single file and write/chmod permissions for that file then be removed from root?

I have a friend (with root access) that wants to prevent himself from having write access to /etc/hosts. I'm wondering if he can create a new user, give me the passcode for that new user, grant that ...
BlandCorporation's user avatar
0 votes
1 answer
3k views

Need to give permissions to /tmp/cache and /tmp/templates_c but can't find them

When I open my website it shows me this: The following directories must be writable by the web server: tmp/cache tmp/templates_c Please correct by executing: chmod 777 tmp/cache chmod 777 tmp/...
sexyberry's user avatar
7 votes
2 answers
3k views

Fix setuid and setgid bits in /usr?

I did something stupid: chown -R root:root /usr chmod -R g-w /usr Apparently, the best thing I can do is reinstall the system. However, my system works fine so far - is there anything immediately ...
Helmut's user avatar
  • 103
1 vote
2 answers
775 views

I used the find command without specifying a directory

I used this command without specifying a directory: sudo find -type d -exec chmod 755 {} \ What could have happened? I was in the /var/www/html folder. Did it change any permissions outside the /var/...
Cayenne's user avatar
  • 45
1 vote
2 answers
33k views

How do I use chmod to make .sh files executable? [duplicate]

My touch overlay is failing to respond in portrait but in landscape I got to a page where I am able to rotate touch input so that it can work in portrait (using this advice on Ubuntu Forums), so I ...
Kayz5ive's user avatar
0 votes
1 answer
5k views

How to use chmod to give a single user from my group permission to my directory?

so ubuntu noob here but I'm in a group with different people having different usernames. So I made a directory, and I want to share this with a single user from that group. How do I achieve this? I ...
ai_boy's user avatar
  • 71
1 vote
2 answers
1k views

Chown and chmod in ubuntu with different applications using common files

I'm having problems with chown and chmod in ubuntu 18.04. When I use php + nginx: touch ('/var/www/a.log'); user:own of a.log is nginx:nginx and chmod is rw-r-r-- when i use shell_exec('ffmpeg -i' ...
im dev's user avatar
  • 11
12 votes
1 answer
62k views

How to set permission "-rw-rw-r--" to file?

I have a file with permission -rwxr-xr-x in Ubuntu. How can I change it to -rw-rw-r--. I played with chmod settings, but was unable to get -rw-rw-r--.
Markus's user avatar
  • 223
0 votes
2 answers
13k views

CHMOD 777. In terminal, the command to make all changes affect every file and folder?

I am typing this: chmod 777 /home/to the destination ... But all locked and what I want to do is to make all files and folders to have read and write permission without doing each file/folder ...
peteubuntu's user avatar
0 votes
1 answer
1k views

simplescreenrecorder: Permission denied

I'd like to use a location different to my home directory for recording videos using SimpleScreenRecorder. However, when I "Browse..." File -> Save as: I get the following error message: Could not ...
TheUltimateSource's user avatar
11 votes
0 answers
562 views

What is the difference between "chmod +x" and "chmod a+x"? [duplicate]

What is the difference between chmod +x and chmod a+x? I know both of these commands make a file executable but what is the difference between these two commands?
Ravexina's user avatar
  • 55.6k
2 votes
1 answer
846 views

Can Unison transfer the executable flag?

I create a Unison setup between my work computer and my desktop at home. This way, I can continue my work at home (and vice versa), even when I forgot to commit something to GIT at work (and vice ...
Christina Vandewijk's user avatar
0 votes
1 answer
55 views

Cannot change ownership of partition

I've been trying to change ownership of an ext4 partition but it just won't work, telling me there's no such file or directory. Here's the relevant output of lsblk └─sda2 8:2 0 411,7G 0 part /...
German_John's user avatar
0 votes
0 answers
139 views

Gaining root access then changing folder permissions

I need to change the permissions on a folder and its sub folders from 'root' to me 'andrew'. First I need to log in as 'root' to be able to change this - correct? The folder is - /usr. Chown and ...
Andrew Rodger's user avatar
-2 votes
1 answer
55 views

Setting separate file permissions for Owner, Group, and All on the same folder

How would I grant myself full file permissions on a particular folder, and also allow others to write to the folder (but not view its contents)? I have already tried chown and chmod commands.
ThomasLMahoney's user avatar
1 vote
0 answers
769 views

NextCloud Wont Launch

I just installed Ubuntu (encrypted) on a surplus server to use as an in-home NAS. I'm trying to get NextCloud up and running, but it failed to launch and popped up a terminal window with the ...
HardRooster's user avatar
0 votes
1 answer
580 views

Stuck for applying permissions with Ubuntu 18.04

This worked on an Ubuntu 14.04 machine. I just switched to Ubuntu 18.04. This isn't working. It's all updated. I plugged in an external drive. I went and looked at the drive through the gui, if ...
ubuntuthinking23523's user avatar
3 votes
3 answers
54k views

"chmod: missing operand" while installing tomcat 7 on Ubuntu 18.04

~/tomcat/apache-tomcat-7.0.90/bin$ sudo chmod 700/tomcat/apache-tomcat-7.0.90/bin/*.sh chmod: missing operand after ‘700/tomcat/apache-tomcat-7.0.90/bin/*.sh’ I am not able to understand this error. ...
Rutuja Jori's user avatar
1 vote
0 answers
20 views

chmod 400 will not change the permissions of a file [duplicate]

I have to change an RSA key file (.pem)'s permissions to 400 so I can use it to connect to an AWS EC2 instance but for some reason I cannot seem to do so. I am in the folder where the file is located ...
wfgeo's user avatar
  • 143
1 vote
0 answers
389 views

chmod +x seems not to add the command [duplicate]

I'm trying to set up the High Precision AD/DA Board from Waveform. The last step is to run sudo ./dac8532_test, where it notes in the instructions that if command not found, to run chmod +x. The ...
auden's user avatar
  • 193
0 votes
0 answers
708 views

Cannot execute binary file for ADOM

I wanted to install a roguelike on my Gallium OS system(I believe galliumos is based of off 16.04 Ubuntu) so I installed the game and ran these commands. chmod +x /home/chrx/Documents/adomgraphical/...
Samuel Quansah's user avatar
0 votes
1 answer
309 views

Wordpress permissions Ubuntu 16.04

I moved my WP installations from Centos 6 to Ubuntu 16.04. I cannot update Wordpress using a separate user for each website. I set the following permissions: find /home/mysite -type d -exec chmod ...
Gary's user avatar
  • 31
4 votes
1 answer
450 views

Hide contents of the home directory

I have a lab of computers used by a dozen students. Each computer mounts a specific NFS share with a few directories in it, visible to all students. Some of the students need a place on the network to ...
PenguinCSC's user avatar
  • 1,444
2 votes
1 answer
3k views

Change only file permissions in a folder NOT RECURSIVELLY

I have a lot of files in one specific folder, and I want to change the permissions only for files and only in this folder (not subfolders), how can I achieve this? Thanks in advance.
lpFranz's user avatar
  • 123
0 votes
2 answers
607 views

Unable to add or delete to internal hard disk (Not a file permission issue)

I have Ubuntu 18.0 LTS, I have a internal harddisk of 1 TB but the problem is I am not able to copy or remove anything from it, I checked several questions similar to this but none of them worked. All ...
Rishi rao's user avatar
0 votes
1 answer
63 views

Removing exeuctable bit on ntfs stored linux files corrupts files

I have a shared partition setup as ntfs for storing Linux files between distros and WSL. My /etc/fstab for the shared partition looks like this: UUID=F2C2ACE4C2ACADF3 /mnt/e ntfs-3g permissions,...
WinEunuuchs2Unix's user avatar
4 votes
2 answers
21k views

Can't change the owner of a folder

I want to change the owner of a folder. The path to to that folder is /mnt/8A30AA8B30AA7DB7/Books. I want to take the ownership of that folder to change the permissions. The folder currently belongs ...
Apoorv Potnis's user avatar
10 votes
2 answers
12k views

Cannot modify files installed by `snap`

I have installed a package using snap and I need to modify one of the files but when I try to change its ownership or permissions, I always get the following message: sudo chmod +x ./my_file.js chmod:...
Miladiouss's user avatar
1 vote
0 answers
65 views

Setting default permissions for all new dirs/files in a dir and its subdirs, no matter who creates them

I have a directory, and I want all directories created in this directory, or its sub dirs, to be 777 and all files created in it or any of its subdirectories to be 666. It doesn't matter which user ...
Askerman's user avatar
  • 826
0 votes
0 answers
691 views

Restricting specific folder access to a user

I have three users. For one user I want to restrict access to some specific folders. When I tried to do this through Ubuntu GUI, it did not work. Can you please tell me some commands so that I can ...
Pranav Mandlik's user avatar
1 vote
0 answers
2k views

change permission of directory and all its sub-directories/files recursively

I have search around but can't find the correct answer. How do I change the permission of a directory and all its sub-directories/files then also when a user creates a file or directory this must ...
Deez Nutz's user avatar
0 votes
1 answer
79 views

Set permissions on a directory for "passing but not browsing"

Set permissions to alu1 home directory to passing (but not browsing) for group members and others. What permissions are passing and not browsing? I know I have to do something with chmod but I don't ...
Makaveli's user avatar
0 votes
0 answers
2k views

Setting sticky bit to mounted folder

I mounted a folder under /media/datasets, owner and group group are specified as root: $ ll /media/ drwxrwxrwx 31 root root 4,0K Apr 19 19:55 datasets Now I want to set the sticky bit to that ...
mcExchange's user avatar
  • 3,088
12 votes
5 answers
141k views

Modify permissions to -rwxr-xr-x [duplicate]

I need some help with a homework problem to modify a file's permissions. It wants it to be -rwxr-xr-x? Not sure how to make the user permissions. Thank you.
Rich's user avatar
  • 153
0 votes
0 answers
343 views

Linux Web Service Permissions

I am implementing my simple webservice in linux using Apache, CGI(C++) and Flat File(Data). I kept my WWW location path in /usr/share/www/ CGI location path in /usr/lib/cgi-bin/ ...
Smith Dwayne's user avatar
1 vote
1 answer
1k views

How to run script at startup that requires a password?

I am running ubutu on a raspbery pi 3 I have a script that runs as root when ubuntu boots. For that script to run correctly I need a password. In other words my script starts like: #!/bin/bash ...
Tono Nam's user avatar
  • 135
0 votes
1 answer
940 views

Can't Move File After Changing Permissions

I have a folder located in /var/www that I am trying to move to my user's home directory. I initially ran mv folder/ ~, and received a permissions denied error. I thought I had set the permissions up ...
DreamConspiracy's user avatar
4 votes
1 answer
1k views

Discrepancy with the output of `ls -al` and `getfacl`

I have run the following script to set permissions into /etc/nginx #!/usr/bin/env bash sudo chown -R root:root /etc/nginx sudo chmod -R 0750 /etc/nginx sudo setfacl -Rbk -m g:baa:rwx /etc/nginx sudo ...
Baa's user avatar
  • 3,432
0 votes
2 answers
779 views

Trying to install reactjs globally in Ubuntu 16.04 lts

Folks, While trying to install reactjs using command npm install -g create-react-app Linux doesn't give write access to the specific directory. Is there any way around it? Or do I have to manually ...
user22222's user avatar
0 votes
3 answers
8k views

chmod 4755 (rwsr-xr-x) gives (rwxrwxrwx)

I want to get the permissions of a program, call_shellcode (which calls shellcode), to be set to -rwsr-xr-x. When I run: sudo chmod 4755 call_shellcode the permissions for some reason is still set ...
JJJ's user avatar
  • 1
3 votes
1 answer
3k views

"chmod g+w" not working: adding permissions on a NAS to a group using file_mode and dir_mode in fstab (Ubuntu 16.04.4 LTS)

Background I am a passionate PLEX Media Server ("PMS") user. I was running both PMS and uTorrent on a Mac Mini in my bedroom. uTorrent downloaded media from the internet to a 2Tb WDMyCloud NAS ("NAS")...
Stefano A's user avatar

1 2 3
4
5
12