Questions tagged [chmod]
chmod (short for change mode) is a Linux / Unix command used to change permissions of files and directories.
324
questions
1
vote
0
answers
163
views
Why does the umask not change as expected in Ubuntu 24.04?
When I create a directory or a file in my website directory (/var/www) with sFTP on Ubuntu 24.04 the chmod is 775 for directories and 664 for files.
I would like the permissions to be 755 and 644.
I ...
0
votes
1
answer
65
views
Messed up with /dev/tty* ownership
I was flashing a Flipper Zero Wifi Dev Board and I needed to have /dev/ttyACM0 owned by dialout group...
The thing is now I have tried to revert the stuff, making a chown root:tty /dev/tty*, and chmod ...
0
votes
0
answers
75
views
How did this usage of chmod break sudo access?
In many other topics, I have seen people breaking their sudo access with commands such as
sudo chmod -R 777 /
and variants. Thinking I was doing it right, I have executed the following commands on a ...
1
vote
1
answer
503
views
chmod setuid giving operation not permission even though the I am the owner
shivanshu@<host> ls -l hello.sh
-rw-r-xr-x 1 shivanshu users 63 Sep 7 17:34 hello.sh
So I am clearly the owner of the file. I am able to change normal permissions like r, w, x using chmod ...
0
votes
1
answer
40
views
Run bulk chmod for all sub-folder .git/ in each project
I know how to CHMOD for single folder such like chmod 700 .git/, however in my server it has multiple project, each of them contains .git/ folder. From a report of repo-lookout.org, they suggest to ...
1
vote
0
answers
252
views
Home folder has been transformed into an encrypted file
Hi I have a weird problem, I've never seen before.
I'm running Linux Mint 20.1.
While running a live USB to try to fix a problem with file permissions on my root folder someone suggested I run >
...
0
votes
0
answers
378
views
How do I specify chmod 744 in Windows Powershell recursively?
Was going to comment on this question but I do not have the rep.
Is there a way to do this recursively?
I would like to give all privileges to any administrator user.
Nothing I do in the windows GUI ...
0
votes
0
answers
272
views
cygwin /usr/bin/install cannot change permissions
When I run /usr/bin/install, I get permissions errors:
bifrost ~ 857# groups
None Local account and member of Administrators group tsysadm Administrators Users NETWORK Authenticated Users This ...
2
votes
2
answers
2k
views
Is there a Windows equivalent to chmod rx (no w access)
I've been trying to use the Windows 10 icacls utility to do this. I did some searching here, and I found this, but it doesn't my specific question. I tried adding a comment to this question, but I don'...
1
vote
0
answers
240
views
Make a file unreadable for owner on Windows
I am working with the automated test suite of a software project. I have an automated test case that should verify that the code works correctly when a specific file is found, but the program does not ...
-1
votes
2
answers
1k
views
Did I break sudo?
So I typed
sudo chmod 777 -R /usr/bin
and now when I try to use sudo, it says,
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
I tried to change the permissions of /usr/bin/sudo ...
0
votes
1
answer
2k
views
Does `chmod +x` make a file an executable or does it assign execute permission on the file?
Does chmod +x make a file an executable or does it assign execute permission on the file?
For example - chmod 111 will allow execute permission to user, group, everyone else.
0
votes
2
answers
732
views
Method to set permissions equal to or less than something like "0740" in Linux
I want all files in every user's home directory to be 0740 or less permissive.
Let's say a user has perms like this:
-rwxr----- 1 doej users 321 Jan 6 2013 file1.txt
-rwxrwx--- 1 doej users 555 Jan 6 ...
1
vote
1
answer
319
views
How are Apparmor and chmod related, if at all?
I'm a beginner programmer setting up my very first Virtual Machine (Debian bullseye) and am trying to wrap my head around Apparmor. When I read it manages "network access, raw socket access, and ...
0
votes
1
answer
468
views
Kali Linux chmod 666
I'm using a user I created with adduser that I logged into. I created a directory through this user (not root) and changed permissions from the standard 644 to 666 (no pun intended) with chmod 666 &...
1
vote
0
answers
295
views
Is this an accurate windows equivalent to chmod 750?
I need to interpret Linux permissions as windows permissions for work. How I see it (considering only these identity references exist for the file):
admin group(also owner) with Full control or ...
0
votes
2
answers
4k
views
How to hide other user's home directories on Linux
I run several systems with hundreds of home directories (a custom web hosting setup, where third parties can have control of certain accounts).
Currently any user could SSH in (or via a script) do &...
0
votes
0
answers
147
views
Secure a folder in a cluster
I have a folder in a cluster that I want to secure by allowing access to me only (read, write and execute). I am new in using clusters, what are the command lines I can use?
I have used umask u=rwx,g=,...
0
votes
0
answers
200
views
Including chmod in shell script - will it work for everyone?
I have a large wrapper.sh file which does a lot of things, but in the end runs catalina.sh tomcat.
Problem is that users who run this wrapper.sh are experiencing error: no permissions to execute ...
0
votes
0
answers
51
views
Using sgid bit on specific executable files to filter their traffic with iptables
I'm trying to filter traffic with iptables for specific applications by their effective owner id (--gid-owner). For this purpose I've created a group
$ sudo addgroup net-user
, set this group on an ...
0
votes
1
answer
2k
views
How to fix 'You don't have permission to open the application' on Mac?
I get the following error when I try to open the app on the mac.
I tried using the following solutions:
Also here is the behavior when I use the keyboard shortcut:
3
votes
1
answer
3k
views
Linux NFS Share - All files read-only, when mounting in Windows 10
I have a Raspberry Pi with Raspberry Pi OS (ex Raspbian).
I wanted to share my home folder (/home/pi) with NFS.
I'd like to access it also from my Windows 10 PC, reading and writing files as I was the ...
1
vote
2
answers
179
views
Generalized chmod function differentiating between directories and files (i.e.: with find)
Is there a generalized bash function available that mimics chmod in every aspect, except that it also let's me differentiate between files and directories?
I know there's already numerous examples ...
0
votes
1
answer
773
views
How do you use Umask in Linux for creating default special permissions like setuid, setgid, and sticky bits?
How do you use Umask in Linux for special permissions like setuid, setgid, and sticky bits?
1
vote
1
answer
80
views
How to create a completely shared Unix directory?
I want to share a directory among 2 users on my system. Here is what I have done so far:
I have users "user1" and "user2". I created a group called "ours" and added both ...
0
votes
0
answers
384
views
How do you set read-only in NFS without root privilege on Linux?
This seems like a relatively straightforward question, but I couldn't really find an answer to this on knowledge bases.
Problem
I want to protect some files so they cannot be edited, deleted by other ...
0
votes
2
answers
2k
views
chmod/chown/mkdir: Operation not permitted as root
I get Operation not permitted for root user on one server but not on the other "identical" server.
Running on Amazon Linux 1.
Server 1:
[root@preprod-1 ]# chown root:root /s3mnt/outliers/
...
0
votes
0
answers
73
views
Trouble setting up permissions for jailed SFTP user
I'm running Arch and have created a new user named moderator that I would like to give access to a couple of folders that they can read / write to.
My plan was to create a new folder, named "mod&...
3
votes
2
answers
5k
views
Can't clear ACL on macOS file - Operation not permitted
I have a MacBook Pro with an external USB hard drive. A program I wrote is having trouble reading the files in Backups.backupdb so I look at the permissions:
> pwd
/Volumes/G-DRIVE
> ls -led ...
0
votes
0
answers
44
views
How to (effectively) make a group an owner for changing privileges
I have data on disk which has a high likely-hood of accidentally being modified and I want to remove all write privileges by myself or anyone else. However, occasionally this data DOES need to be ...
0
votes
0
answers
376
views
chmod will not set directory permissions for user
I am trying to learn UNIX permissions for the purposes of safeguarding raw data. My OS is macOS Catalina.
While trying to learn to use chmod, I've come across a situation where chmod will not make the ...
2
votes
1
answer
697
views
I ran sudo chmod go-w /usr on my Mac - is this an issue?
So as the title suggested while troubleshooting a warning message, I mistakenly ran the following command in my Mac Terminal:
sudo chmod go-w /usr
Is this likely to cause me any problems and if so, ...
1
vote
1
answer
2k
views
How to compare file permissions between two files?
I'm trying to script a check to make sure two files have the same permissions. There are several ways to think about permissions, the most basic being a hex value (e.g. 777). How can I compare the ...
1
vote
1
answer
2k
views
Can't delete, chown or chmod file even as root
I want to delete a backup of a website (FTP-mirrored with wget), but a single file, named js_composer.less resists. I can create new files and delete them in the same directory, so the problem might ...
0
votes
1
answer
1k
views
How can i specify which group can read and write files in directory
i have two groups
boys
girls
boys have users
pete
ali
girls have users
alice
mary
i have d1 directoy in home/pete
I want to let only pete can read and write the files in that folder,
And ali ...
0
votes
0
answers
510
views
On macOS Catalina, what are the default permissions for the /Users folder?
I have done a very stupid thing and, welp...
chmod 755 /Users
Tried googling but I just cannot seem to find any info as to what permissions should this folder have. Scared to break the system while ...
0
votes
0
answers
85
views
chmod having no results in specific folder
I was playing around with setfacl and now I can't access /var/www unless I use sudo. When I try to go to my webserver I get a 403 error.
user@computer:~$ ls -l /var/www
ls: cannot access '/var/www/{...
0
votes
0
answers
1k
views
Google Compute Engine: doing chmod -R 777 /home/user blocks SSH access?
I am trying to setup multiple users on a Google Cloud Instance running Ubuntu 18.04. One of the steps I do, sudo chmod -R 777 /home/user blocks future ssh connexions to the instance, with message:
...
0
votes
0
answers
229
views
Have directory that anyone in a group can chmod from 444 to 777
I have a release area that I (not a super user) manage. Nominally the privileges are 444 (Only read access for myself, group, and everyone). I don't want myself or a group to nominally have write ...
3
votes
0
answers
579
views
Correct permissions for dylib and so libs on macOS
I am building an installer for my application. What would be the correct permissions for *.dylib on macOS and *.so files on Linux? Do they need the execution bit or could they be installed as 644, or ...
2
votes
1
answer
10k
views
MacOS switched root Mongodb data folder to system ownership and it cannot be changed back anymore
The title gives it away, I suppose.
Here's the deal:
MacOS switched my /data/db folder, which is used by MongoDB, which I need to get a ton of work done, to read-only file system.
Basically happened ...
0
votes
1
answer
2k
views
chmod 700 on behalf of another user
The Arch wiki states to ensure that the .xsession file in your home directory should be executable when configuring xdm
$ chmod 700 ~/.xsession
If I am running my install via a script as root,this ...
0
votes
0
answers
69
views
Ubuntu 18.04 SFTP with users and one major user
I have an Ubuntu 18.04 system running and want to access this system using SFTP.
I have a lot of users, that shall access /var/ftp/data/%u, additionally, I need a user f_sftp, that can access and read ...
52
votes
3
answers
7k
views
Do I really need recursive chmod to restrict access to a folder?
If I want to restrict access to a folder secret on a shared machine, do I really need recursive chmod on the folder
chmod -R g=,o= secret
or is chmod on the folder sufficient?
chmod g=,o= secret
...
2
votes
0
answers
2k
views
FTP User/Group permission on VSFTPD and UBUNTU
I developed a vsftp server with three user groups: g1, g2, g3. Each group has a folder with its name. For example.
/home/server/g1
/home/server/g2
/home/server/g3
Each group also has users
sudo ...
0
votes
1
answer
1k
views
Linux auto chown web uploaded files to users folders
I have a home server that stores my files and I access the files in my internal network with samba. I have 3 users and each user has its home folder on /home/user.
In order to access the files from ...
1
vote
0
answers
325
views
How to chmod by file extension to remove execute permission on some file types?
I have searched but couldn't find a proper way to do that. I find annoying that each time I click on a text or code file I have a prompt where I can execute the file (maybe it's me that messed up ...
2
votes
3
answers
4k
views
How to automatically change permissions and owner:group on any file added to a specific directory?
I run an unRAID server (unRAID is based on Slackware) and would like to find a way to automatically change the permissions and ownership of every file added to a specific directory.
Specifically, I ...
4
votes
3
answers
3k
views
What to do when you remove permission for all users with chmod?
I am using Debian 8 stretch and I typed the command:
chmod a-wx *
Then my desktop turns black and I cannot reboot back to the OS.
1
vote
1
answer
2k
views
Can't Make an *.AppImage file Executable
I right clicked on a .AppImage file. I chose "Properties" and then "Permission" tab.
I'd like to check the checkbox that is next to "Allow executing file as program".
It shows that the checkbox is ...