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
1 vote
0 answers
31 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 ...
user avatar
  • 11
-1 votes
2 answers
55 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 ...
user avatar
0 votes
1 answer
62 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.
user avatar
  • 182
0 votes
2 answers
61 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 ...
user avatar
0 votes
0 answers
57 views

chmod 000 permission macOS

I'm trying to change the permission of a test file on my Mac using the command chmod. Everything is ok except for the user permission that doesn't change. How can I fix the problem? I have already ...
user avatar
0 votes
0 answers
22 views

Centos Sftp group permission

I take over the work of a colleague who has left. I can not figure out how to manage group access on a sftp service. getfacl /CR_RCT/Nps/ # owner: root # group: NPS user::rwx group::r-x group:...
user avatar
1 vote
1 answer
63 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 ...
user avatar
  • 11
0 votes
1 answer
114 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 &...
user avatar
  • 1
0 votes
0 answers
34 views

How to log chown and chmod on linux

I have a multi user system where there are many roots, and they are all learning. The main problem is that they chown and chmod files and folders and produce chaos :)) Best would be to run the ...
user avatar
1 vote
0 answers
74 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 ...
user avatar
  • 11
0 votes
2 answers
721 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 &...
user avatar
  • 103
0 votes
0 answers
26 views

How can I run in one auto file some several instructions using chmod 777?

I have problem with running npm. When I see this error, 'sh: codestates-submission: command not found' I have to input these. Then it works. npm cache clean --force rm -rf node_modules folder rm ...
user avatar
0 votes
0 answers
30 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=,...
user avatar
0 votes
0 answers
37 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 ...
user avatar
0 votes
0 answers
35 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 ...
user avatar
  • 483
0 votes
1 answer
1k 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:
user avatar
  • 101
2 votes
1 answer
432 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 ...
user avatar
  • 111
1 vote
2 answers
119 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 ...
user avatar
0 votes
1 answer
198 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?
user avatar
1 vote
1 answer
22 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 ...
user avatar
0 votes
0 answers
104 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 ...
user avatar
  • 101
0 votes
2 answers
774 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/ ...
user avatar
0 votes
0 answers
38 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&...
user avatar
1 vote
2 answers
1k 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 ...
user avatar
  • 151
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 ...
user avatar
  • 101
0 votes
0 answers
160 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 ...
user avatar
  • 1
2 votes
1 answer
519 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, ...
user avatar
1 vote
1 answer
308 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 ...
user avatar
  • 1,783
1 vote
1 answer
588 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 ...
user avatar
0 votes
1 answer
154 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 ...
user avatar
  • 15
0 votes
0 answers
235 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 ...
user avatar
0 votes
0 answers
40 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/{...
user avatar
  • 13
0 votes
0 answers
807 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: ...
user avatar
  • 121
0 votes
0 answers
79 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 ...
user avatar
  • 101
2 votes
0 answers
235 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 ...
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 ...
user avatar
0 votes
1 answer
738 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 ...
user avatar
  • 53
0 votes
0 answers
36 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 ...
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 ...
user avatar
  • 629
2 votes
0 answers
964 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 ...
user avatar
  • 121
0 votes
1 answer
469 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 ...
user avatar
1 vote
0 answers
151 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 ...
user avatar
  • 111
2 votes
3 answers
3k 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 ...
user avatar
4 votes
3 answers
1k 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.
user avatar
1 vote
1 answer
929 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 ...
user avatar
1 vote
1 answer
13k 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 ...
user avatar
  • 13
0 votes
0 answers
552 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 ...
user avatar
25 votes
4 answers
185k views

How to fix 'The application "..." can't be opened' on Mac?

I get this: Some people said use chmod to fix the execution files thing, but I still don't understand how to do it. Can some one tell me step by steps please?
user avatar
-1 votes
2 answers
1k views

The case of special permission on Linux [closed]

I am a beginner in the Linux system and when I learned the commands, I learned to study the permissions and the owners. I understood all the commands but did not understand the special permission. I ...
user avatar
  • 11
1 vote
1 answer
1k views

Give write access to www-data and another user to a folder

My question is similar to this. I have a custom logs folder at public_html/logs/ I need Apache (PHP scripts) to be able to write to that folder. I also need FTP user myuser to able to read/write on ...
user avatar
  • 5,257

1
2 3 4 5
7