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

Ubuntu 22.04 katlooon installation errors when running git commands and directory doesnt exist

im on ubuntu 22.04(?) and im trying to install kali repo apps (im still learning Linux i might sound confusing) and i installed git in terminal but when trying to get katloon it installs the first ...
Nickalos's user avatar
0 votes
0 answers
59 views

Setting Default 666 Permissions for Specific File Types (.xlms, .png .pdf...) in Linux Using ColdFusion

I am working on a project using ColdFusion on a Linux system, and I need to programmatically set default permissions (666) for files with specific extensions (.pdf, .xlsx, .png, .html, .zip). Despite ...
Atul Verma's user avatar
0 votes
2 answers
116 views

Is it possible to revert sudo chmod 777 -R /home/USER/docker?

I'm starting to learn more about Linux and Ubuntu while I'm building a home server. But when reading a tutorial I was suggested to add sudo chmod 777 -R /home/USER/docker in the terminal for the ...
Dextive's user avatar
0 votes
1 answer
90 views

sudo chgrp and sudo chmod will be reset after reboot

quick summary: I met some problem during my work on OrangePi 5 plus develop board, the operation like chgrp and chmod will be reset as default after reboot. I installed official Ubuntu 22.04 image ...
Ultra Hertz's user avatar
2 votes
1 answer
463 views

How to change permissions (chmod)?

I have created a folder not in /home but on other volume which is free (eventually I'd like to share the folder via Samba). I have found the path: /media/xduser/kingstone I did: cd /media/xduser/...
ZedZip's user avatar
  • 207
0 votes
1 answer
56 views

Won't boot into recovery or normal after running chmod command as root in recovery

I screwed up big time with my home server. I lost sudo on my user account and was following a guide to re-enable it. I went into recovery mode and when into the root shell and ran these commands: ...
TheoZoulas's user avatar
1 vote
1 answer
922 views

I accidentally run command "chmod 555" on system directories [duplicate]

I accidently ran sudo chmod 555 / and now all users have lost access to the server Error: Last login: Thu Oct 18 16:50:55 2023 Could not chdir to home directory /home/User1: Permission denied /bin/...
hergo herna's user avatar
17 votes
7 answers
5k views

Can we prevent a command from being executed for root in Linux?

There is this script that is difficult to read and debug. Somewhere in it, it has commands like this: sudo chmod -R 777 /$some_var/$another_var In other words, it creates a path dynamically, and then ...
Saeed Neamati's user avatar
0 votes
0 answers
206 views

How to give a permenant permission for a disk?

I have hdd that has been mounted to a new folder Backup that I created in /media /dev/sda1 15T 28K 14T 1% /media/Backup But I am not able to create any folder and the permission is as ...
S.EB's user avatar
  • 189
26 votes
9 answers
6k views

How to fix "chmod" permissions after running "chmod 222 /bin/chmod"?

I ran chmod 222 /bin/chmod to know more about chmod. After that, when I run /bin/chmod, I get permission denied. I tried to change the permissions of chmod back to 755, but it doesn't work. Does ...
Charming_Yard's user avatar
1 vote
1 answer
2k views

/run/user/1000 is not owned by UID 1000, as it should

So I have this error going on, and its the origin of a lot of errors with snap that I'm recieving. So when I execute: $ systemctl status display-manager Recieved some text and: gkr-pam: unable to ...
P2000Gua's user avatar
0 votes
0 answers
69 views

Can't save or download data to USB memory stick

I normally use Windows on my desktop but like to experiment with Linux. I've tried several distros and different desktops. I'm currently using Ubuntu with Cinnamon but my problem applies to all other ...
bwallx's user avatar
  • 1
0 votes
0 answers
35 views

Permission on the main folder isn't reflected on the sub folders

I have assigned a folder(MF) to a group (ENG). This group has read, wright and execute permissions to the folder MF. However, MF has sub folders in it. Some sub folders do not list the ENG group to ...
Rakesh Nittur's user avatar
0 votes
1 answer
45 views

Giving specific rights

I have the directory called 'sales' and 2 groups called 'Sales' and 'HRM'. As shown below, I have a list with all directories, and connected groups. Without changing the directory's group, i need to ...
Zennert's user avatar
0 votes
0 answers
460 views

I cannot rm -rf this directory Permission denied even though I have perm WSL2 ubuntu

So there is this location ~/.local/share/nvim/mason/.packages for mason to properly install packages it apparently needs to be able to remove stuff within this folder however my user doesn't have perm ...
Sombre Dreamer's user avatar
0 votes
0 answers
18 views

Restoring correct file permissions for /var/ [duplicate]

Whilst running some chmod commands for Oxid 6, I made the rookie mistake of not double checking what was written fully and managed to chmod 777 /var -R as part of my command How can I restore the ...
Alex's user avatar
  • 101
0 votes
1 answer
264 views

nftables.conf - file permissions

after the plain installation of nftables (ubuntu server 22.04) the permissions of the /etc/nftables.conf file are set to 755 (-rwxr-xr-x). i cannot believe that it's necessary that anyone has read and ...
Shaun.M's user avatar
  • 21
1 vote
2 answers
3k views

Give read only access to every user for a folder

I am the owner of directory mydir. I don't have root access. How can I give only read access to someone so that they can create a local copy of mydir? Edit: ChatGPT tells me chmod -R o+r mydir should ...
helperFunction's user avatar
6 votes
4 answers
3k views

I accidentally typed sudo chmod -R 777 to /var insted of /var/www

I accidentally typed sudo chmod -R 777 to /var insted of /var/www so now I cannot open some applications like Skype or Ubuntu Software. Is there any way to fix this?
s0mething001's user avatar
0 votes
1 answer
632 views

Set file permissions, exclude folder - doesn't work with chmod (works with chown?)

I want to change file permissions and exclude a folder and it's contents (or only the contents is okay too). It doesn't seem to work the same way as with chown - beause with chown I can change owner ...
Galivan's user avatar
  • 101
0 votes
0 answers
232 views

EXT4 file, read and write inside ext4

I'm trying to modify .apk file inside ext4 file. I used mount to mount ext4 file and chmod to gain write permissions. If I mount, chmod, dont make anything else, chmod back to original permiossions, ...
empe1337's user avatar
0 votes
0 answers
157 views

Give permission to other users to access disk

I created a new disk and mounted it and made entries in fstab file but the disk can only be accessed by the root user.How to 1.Give permission of read and write to the disk for other users 2.Give ...
san11's user avatar
  • 1
0 votes
0 answers
371 views

Problems moving files to a samba share: permissions and ownership not persistent

I have samba running on a Ubuntu 22.04 machine so I can share an specific directory with another Ubuntu 22.04 client machine. This directory on host has no files on it. Samba config on host is as ...
gelcom's user avatar
  • 1
8 votes
1 answer
1k views

Any recover from sudo chmod 600 / [duplicate]

I was configuring ssl certificate on server and while following documentation I accidentally pasted terminal command without checking. sudo chmod 600 / usr/local/nginx/ssl/my-ssl.key It immediately ...
Roko's user avatar
  • 183
0 votes
1 answer
203 views

Need help after setting my /etc folder to chmod 777 [duplicate]

So I did the really dumb CARELESS action of running sudo chmod -R 777 ./ while in the etc folder. I can’t ssh into my server or anything now. I feel like an absolute idiot ofcourse because this could ...
Lite's user avatar
  • 1
0 votes
1 answer
1k views

Set permissions on a specific user for /var/www

I have a standard user on an Ubuntu 22.04 Desktop VM named "user1". The VM is running apache2. I would like user1 to not be able to access the contents of the folder /var/wwww to keep the ...
Andrew Campi's user avatar
0 votes
0 answers
170 views

Permission management in Linux Ubuntu

I am new to Linux and need some help with permission management on directories for groups on ubuntu server. Permission needed for groups on directories are as show below: As per my understanding, in ...
Dev's user avatar
  • 1
0 votes
0 answers
34 views

give write access to another disk with ubuntu 20.04

I'm new to linux and I'm struggling a bit with this problem. I have an HP HP EliteBook 840 G3 with an SDD disk on which I have installed ubuntu 20.04 and a hard disk on which I have windows. the hard ...
Sir's user avatar
  • 1
0 votes
1 answer
3k views

hello i have this proplem chmod: missing operand after ‘+x’

hello every body im new in linux so i have this proplem im writing this coomand '' chmod +x'' in ubuntu but when i click enter it shows chmod: chmod: missing operand after ‘+x’ Try 'chmod --help' for ...
Bassel Holiby's user avatar
1 vote
1 answer
53 views

Why are my backed-up & restored files now all set to +x (filemode 755, previously 644) on 22.04 Jammy Jellyfish?

Background I had a failed update from 21.04 to 22.04 because of a misunderstanding that I had about updating my Ubuntu installation. I asked about what had happened here. Luckily I was able to back-...
raddevus's user avatar
  • 1,800
0 votes
1 answer
580 views

Will usermod update all file and folder permissions correctly?

I have an issue with docker, because docker will write files with UID 1000, but my UID in the host is 1001. a workaround is changing UID of my host user to 1000 that means change the existing user in ...
Toskan's user avatar
  • 244
0 votes
0 answers
148 views

Cannot read a file from user in group

I've a file which permission are -rwxrwxr-x 1 an-user www-data 1094 Jun 9 09:42 myfile The group is www-data, so any one in the www-data group should be allowed. When trying to read the file through ...
Orion644's user avatar
-1 votes
1 answer
3k views

Unable to change file and folder owner and permission from root to other users ( Ubunto 20.4)

I am new to linux. I have a partition in which all the folder and files owner is set as root.I am unable to change anything using chomd and chown when i write the commands as : sudo chown -c -v user ...
Saad Mughal's user avatar
1 vote
0 answers
217 views

Directory appearing as file, acting like directory in bash

This question has been asked before, but, I think without the appropriate complete description of the problem so it was dismissed off-hand, but it's real, and I'm looking at it. This is not my first ...
BenG's user avatar
  • 11
0 votes
0 answers
122 views

/dev/nvme0n1p3 ubuntu 20.04 does not booting up

I'm in a trouble. I've changed diretory "usr" using command "chmod" and now my laptop Is crashed. I'm having the followed message in a Black screen when it's turning on: "/...
Carlos Cezar's user avatar
0 votes
0 answers
2k views

chmod+x command not found

I am installing PyRx software for virtual screening in Ubuntu 20.04 version but when I run the command: chmod+x Pyrx-0.8-linux-x86_64-install it gives an error: chmod+x: command not found How to ...
Misbah naseem's user avatar
1 vote
1 answer
537 views

accidentally ran sudo chmod 700 /* [duplicate]

i accidentaly ran " sudo chmod 700 /* ", is there a way to undo this..? i have no idea what to do. I am on Ubuntu 22.04 desktop amd64
amogus guy's user avatar
3 votes
0 answers
1k views

root ownership after mounting a drive with ext4 format

I have formatted with ext4 format by GParted: (1) an USB flash drive and (2) an external hard drive. So far so good, but now they have root ownership and non edit permissions. I can update the ...
zeugor's user avatar
  • 483
0 votes
1 answer
1k views

How can I give permissions for folders in Linux?

I have to create company/lawyers Company/accountants Company/users/Tim Company/users/Mike Company/users/Rob Company/users/Ann I also have to give permission to make changes for company only to root, ...
Marina's user avatar
  • 1
1 vote
1 answer
1k views

linux I want to add permission on two groups

I have my owner (Pierre) and he has all permission on g586 folder, I have my first group (G586) have read permission, I have another groupe name (teacher) have read and execute permission, and other ...
Francis Goudreault's user avatar
1 vote
1 answer
9k views

File permissions are not changing using the chmod command [duplicate]

I want to transfer files from my PC to an external HDD. I tried all the chmod commands but they are not changing file permissions. The GUI settings are also not working. My external HDD is NTFS.
Jessica Fernandez's user avatar
0 votes
1 answer
2k views

Getting error "Permissions 0777 for 'myname-2.pem' are too open" while connecting to AWS EC2 instannce

Why connecting to Amazon instance, I got following error: $ ssh -i "myname-2.pem" [email protected] @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
Rnj's user avatar
  • 199
1 vote
1 answer
615 views

I accidentally did chmod wrong and some commands show permission denied

I wanted to set chmod 644 to some files in my ubuntu like this sudo chmod 644 ./* but I accidentally did sudo chmod 644 /* It has corrupted my ubuntu, some commands start show permission denied. The ...
game lover's user avatar
0 votes
1 answer
2k views

I accidentally ran sudo chmod -R 777 /home/

I accidentally executed: sudo chmod -R 777 /home/ Is there any way to recover from this?
CHANDUKA SAMARASINGHE.'s user avatar
0 votes
1 answer
2k views

Unable to change permissions and user:group of SMB mounted directory

I have a trueNAS SMB mount to a Proxmox VM directory. The mount works fine however, in order for services to automatically move files from one part of the same directory to another, I need to remove ...
user2985708's user avatar
0 votes
1 answer
363 views

Will I break things if I use "sudo chmod -R u=wrx [user]"?

I have multiple users and some have access to files of other users, I want to make sure they can only access the files and folders I set up. So I gave certain folders a public subgroup chown [...
apmech707's user avatar
4 votes
1 answer
16k views

How do I set permissions to use Docker with my normal user? [duplicate]

I use Ubuntu 20.04 and I use docker to run images. When I installed and ran the docker command for the 1st time, the following error occurred in the shell. Got permission denied while trying to ...
at8819's user avatar
  • 43
1 vote
0 answers
24 views

running series of commands gives other result than running them on script [duplicate]

this is the script: #!/bin/sh rm -rf git/ mkdir -p git/{c,ds/{include,test},projects,quizzes,system_programming} find git/ -type d -exec touch {}/dummy.md \; This is the wanted result: git/ ├── c │   ...
Asaf's user avatar
  • 11
7 votes
1 answer
2k views

After installing youtube-dl on Ubuntu 21.10 with the instructions on github many applications, including default text editor, broke

A new user here, running ubuntu on version 21.10 impish. I was installing youtube-dl with the instructions on the github page (https://github.com/ytdl-org/youtube-dl#installation): $ sudo curl -L ...
Tomptp's user avatar
  • 73
1 vote
1 answer
128 views

Permissions makes libreoffice go in a crash-loop when opening from terminal

I am having some permission issues with libreoffice that I just don't have the technical provess to understand. ISSUE when I run localc directly from terminal, it goes into a loop: the program crashes ...
emilBeBri's user avatar
  • 234

1
2 3 4 5
12