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
0answers
22 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
1answer
410 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:
0
votes
0answers
19 views

Linux NFS Share and file permissions in Windows

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
2answers
99 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
1answer
36 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
1answer
20 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
0answers
30 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
2answers
306 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
0answers
19 views

File permissions - read and access only for one user

Description: Debian GNU/Linux 9.11 (stretch) Release: 9.11 Codename: stretch Is it possible to deny read and access permissions to all users except myself and another specific user without ...
0
votes
0answers
44 views

Chmod -R 700 / (systemwide Chmod) Wireless not detected. Is there a way I can fix this with Perl?

Multiple issues here. I tried to chmod my home directory as root to 600 and it hit the entire system before I could stop it. I don't know what the settings are supposed to be but I know Perl can fix ...
0
votes
0answers
30 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&...
1
vote
2answers
618 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
0answers
39 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
0answers
34 views

Consultation Linux command "chmod'. Why this command no work? [duplicate]

I have a faulty equipment with OS Linux. I found a spare part, but I need change the it serial number through Linux. I'm trying to change it using the command chmod. But it no working. Information ...
0
votes
0answers
124 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
1answer
261 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
1answer
28 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
1answer
243 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
1answer
59 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
0answers
203 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
0answers
35 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
0answers
529 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
0answers
58 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 ...
2
votes
0answers
142 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
1answer
8k 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
1answer
376 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
0answers
28 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
3answers
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 ...
2
votes
0answers
699 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
1answer
207 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
0answers
104 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
3answers
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 ...
4
votes
3answers
986 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
1answer
684 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 ...
1
vote
1answer
9k 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 ...
0
votes
0answers
453 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 ...
18
votes
4answers
128k 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?
-1
votes
2answers
977 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 ...
1
vote
1answer
834 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 ...
0
votes
1answer
2k views

Is setting CHMOD to 777 Dangerous?

I am trying to install Prestashop and spoke with the technical support representative from BlueHost regarding questions I had on setting the file permissions to 777 as stated in the following ...
112
votes
4answers
296k views

Linux - How to recursively chmod a folder?

How can I recursively chmod everything inside of a folder? e.g. I have a folder called var which contains many subfolders and files. How can I apply chmod 755 recursively to this folder and all its ...
0
votes
1answer
284 views

I can no longer log into my Mac after “sudo chmod 744 /”

Right after I executed: sudo chmod 744 / on my Mac, everything on my desktop is gone, and I can no longer open any applications or folders. So I pressed the power button to restart my Mac, but then ...
5
votes
5answers
13k views

chown -R exclude some directory

I want to exclude some large content directory I'm Using it to chown Directory chown -R admin /home/admin/web/public_html is there anyway to exclude a subdirectory under html Like: chown -R admin ...
0
votes
0answers
1k views

recursive chmod on current directory

I was in a directory I wanted to recursively chmod all of its contents (make writable by the group). I did (with sudo): chmod -R g+w . And something weird happened (I lost all permission to the ...
0
votes
1answer
358 views

Unable to login after manual edit of /etc/passwd

Had a trouble with transmission daemon's permission. It keeps using default debian-transmission even after editing /etc/init.d/transmission-daemon. So I edited the /etc/passwd and set 0:0 to debian-...
-1
votes
1answer
533 views

i need help reversing a chmod, chown and 'whoiam' code

I used this code on an app: chmod 600 /Applications/Freedom.app ; chown 'whoami':staff /Applications/Freedom.app Does anyone know how to undo this?
1
vote
0answers
467 views

Default permissions for files within directory when using rsync

I am attempting to configure the file permissions that are set on directories and files when they are created by a specific user/group, but seem to be having a bit of an issue. I have tried setting ...
1
vote
0answers
2k views

chmod -R -r not working on macOS High sierra

I've upgraded from El Capitan to High Sierra (beta 9). On El Capitan, running the command chmod -R -r <path to dir> works fine (revoking read permissions recursively). On High Sierra I get the ...
0
votes
1answer
2k views

Can't change owner of folders/files on thumb drive

I have a drive being mounted (either manually or automatically using usbmount) and I can't change the owner or modify the permissions on the mounted drive or folders/files within in order for Mono to ...
0
votes
1answer
5k views

Run shell script at startup (Kali Linux)

This seems like a very basic thing to do, and I have even followed a few tutorials to get a simple script to be run at startup, but to no avail. Here is what my script, which is in the root directory,...

1
2 3 4 5
7