Questions tagged [chmod]

chmod (short for change mode) is a Linux / Unix command used to change permissions of files and directories.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 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 ...
Kağan Aytekin's user avatar
1 vote
1 answer
42 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 ...
Shivanshu Arora's user avatar
0 votes
1 answer
25 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 ...
Khoi Pro's user avatar
1 vote
0 answers
104 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 > ...
ClosupJofre's user avatar
0 votes
0 answers
177 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 ...
Ray Tayek's user avatar
0 votes
0 answers
149 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 ...
Erik Bennett's user avatar
2 votes
2 answers
774 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'...
Paul's user avatar
  • 131
1 vote
0 answers
154 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 ...
magicus's user avatar
  • 11
-1 votes
2 answers
669 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 ...
Lucy Manzoli's user avatar
0 votes
1 answer
1k 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.
variable's user avatar
  • 204
0 votes
2 answers
375 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 ...
davidhaskins's user avatar
1 vote
1 answer
192 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 ...
Rods's user avatar
  • 11
0 votes
1 answer
273 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 &...
Petter's user avatar
  • 1
1 vote
0 answers
210 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 ...
Josh's user avatar
  • 11
0 votes
2 answers
3k 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 &...
Nick's user avatar
  • 103
0 votes
0 answers
76 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=,...
user1447888's user avatar
0 votes
0 answers
79 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 ...
Avaldor's user avatar
  • 101
0 votes
0 answers
46 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 ...
raacer's user avatar
  • 533
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:
Morozov's user avatar
  • 101
3 votes
1 answer
2k 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 ...
sigi_tm's user avatar
  • 121
1 vote
2 answers
156 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 ...
Decent Dabbler's user avatar
0 votes
1 answer
532 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?
vikram singh's user avatar
1 vote
1 answer
39 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 ...
XOpenDisplay's user avatar
0 votes
0 answers
285 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 ...
boomkin's user avatar
  • 101
0 votes
2 answers
1k 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/ ...
masterpiece's user avatar
0 votes
0 answers
56 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&...
Syllith's user avatar
2 votes
2 answers
3k 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 ...
Rob N's user avatar
  • 191
0 votes
0 answers
42 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 ...
nanotek's user avatar
  • 101
0 votes
0 answers
278 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 ...
Leo's user avatar
  • 1
2 votes
1 answer
633 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, ...
user892028's user avatar
1 vote
1 answer
1k 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 ...
tarabyte's user avatar
  • 2,133
1 vote
1 answer
1k 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 ...
Márton Tamás's user avatar
0 votes
1 answer
704 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 ...
M J's user avatar
  • 15
0 votes
0 answers
356 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 ...
Andy Mac's user avatar
0 votes
0 answers
48 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/{...
DCowan's user avatar
  • 23
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: ...
Matifou's user avatar
  • 141
0 votes
0 answers
168 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 ...
nanotek's user avatar
  • 101
3 votes
0 answers
399 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 ...
Daniel Stephens's user avatar
2 votes
1 answer
9k 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 ...
Dom Berk's user avatar
0 votes
1 answer
1k 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 ...
ZR_'s user avatar
  • 53
0 votes
0 answers
48 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 ...
Human_BetaRelease's user avatar
52 votes
3 answers
6k 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 ...
clemisch's user avatar
  • 629
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 ...
Mutante's user avatar
  • 121
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 ...
Lorenço Santos's user avatar
1 vote
0 answers
275 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 ...
TOPKAT's user avatar
  • 111
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 ...
xthursdayx's user avatar
4 votes
3 answers
2k 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.
scholar guy's user avatar
1 vote
1 answer
1k 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 ...
user2824371's user avatar
1 vote
1 answer
18k views

How to add chmod +x on a file, from right click menu service in mac

so i need to use chmod +x alot, and i thought it could be easier to make a service in Automator to add it to the right click menu, so it will run chmod +x on the selected file as choose it from the ...
Pabate's user avatar
  • 13
0 votes
0 answers
782 views

How can I recursively change permissions for files and directories on Windows Subsystem for Linux?

Every time I use sudo chmod -R +755 * or sudo chmod -R +755 ., it resets all of the file permissions to 000 in the directories and subdirectories. If I run sudo chmod +755 *, it will properly add ...
Max Candocia's user avatar

1
2 3 4 5
7