Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [chmod]

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

0
votes
1answer
42 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 ...
1
vote
1answer
21 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 ...
1
vote
1answer
84 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 ...
0
votes
1answer
33 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 ...
0
votes
1answer
22 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 ...
0
votes
0answers
77 views

chmod does not seem to be changing permissions of a sd card

I have been using ubuntu on my chromebook for a while now (I still don't know a whole lot about ubuntu though) and one of the downfalls of chromebooks are their abysmal memory which by the time I ...
0
votes
1answer
53 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/...
6
votes
2answers
191 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 ...
0
votes
2answers
37 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/...
0
votes
1answer
104 views

vnstat chmod permissions

Ubuntu 16.04LTS, I just installed vnstat. Seems, it's not update statistic. What should be correct chmod permissions for all interfaces? jettay@ubuntu3:/var/lib/vnstat$ ll /var/lib | grep vnstat ...
0
votes
3answers
163 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 ...
0
votes
1answer
184 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 ...
1
vote
2answers
193 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' ...
0
votes
1answer
129 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--.
0
votes
2answers
200 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 ...
0
votes
0answers
20 views

Limiting file read permissions

I am trying to deny read permissions for others users home directories. Currently I have many users whom access our files via an external ftp server. Each user has their files stored in their home ...
0
votes
1answer
57 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 ...
11
votes
0answers
140 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?
0
votes
0answers
34 views

How to set default permission of .sh files for inside certain directory [duplicate]

I have created a directory /root/script/. Now I want to set default execution (x) permission for all files/folder of /root/script and also want to set the same for newly created files/folder. It means ...
2
votes
1answer
18 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 ...
0
votes
1answer
14 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 /...
0
votes
0answers
85 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 ...
0
votes
0answers
455 views

Cannot change file permission after chmod 400

I am about to prepare for using AWS Jupyter Notebook. However, when using SSH to connect AWS, warning message of unprotected private key file prompted out. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
-2
votes
1answer
27 views

How do I set separate file permissions for file's owner and others (Ubuntu 14.04)?

I'm trying to set up a "drop box" on my Ubuntu 14.04 system. The directory should allow me read/write/execute permissions. Others should be able to put files into the directory, but not view the ...
1
vote
0answers
239 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 ...
0
votes
1answer
174 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 ...
0
votes
0answers
24 views

How do I fix my laptop after running chmod -r 777 on / aka root. PLEASE HELP ME [duplicate]

I ran chmod -r 777 on / (or root), how do i restore them back, or what directories do i need to change in safe mode in order to boot. I cant boot, but i can go into root console through safe mode
2
votes
2answers
963 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. ...
0
votes
0answers
25 views

I did sudo chmod -R 700 /usr, is there anything I can do? [duplicate]

I was messing around with permissionions and I did a really stupid thing: sudo chmod -R 700 /usr. Is there any way I can recover from this? I am also using dual boot- I have Windows installed on same ...
1
vote
0answers
17 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 ...
1
vote
0answers
23 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 ...
0
votes
0answers
242 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/...
0
votes
1answer
107 views

Wordpress permissions Ubuntu 16.04

I moved my WP installations from Centos 6 to Ubuntu 16.04 I cannot updat wordpress using a seperate user for each website I set the following permissions find /home/mysite -type d -exec chmod 755 {} \...
4
votes
1answer
166 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 ...
1
vote
1answer
313 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.
0
votes
2answers
69 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 ...
0
votes
1answer
33 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,...
3
votes
2answers
3k 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 ...
3
votes
2answers
1k 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:...
1
vote
0answers
25 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 ...
0
votes
0answers
50 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 ...
1
vote
0answers
399 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 ...
0
votes
1answer
56 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 ...
0
votes
0answers
240 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 ...
1
vote
5answers
9k 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.
0
votes
0answers
49 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/ ...
1
vote
1answer
52 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 ...
0
votes
1answer
31 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 ...
2
votes
1answer
132 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:hugo:rwx /etc/nginx ...
0
votes
2answers
313 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 ...