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
1answer
22 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
27 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 ...
1
vote
0answers
28 views

Restrict usage of chmod

We have a server cluster that we user for memory intensive calculations. I am one of the users as well as data managers, not the cluster owner. One of my roles is to make sure that we do not exceed ...
0
votes
0answers
18 views

XenForo folder permission error

Recently I migrated my website from a server to another. The OS and the web server software are the same on both servers (Apache HTTPD on CentOS 7). When I transferred the forum I encountered a ...
0
votes
1answer
24 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
73 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
32 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
150 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
21 views

How to overwrite files and preserve TARGET attributes?

I'd like to overwrite files in a way that preserves the TARGET ownership and permissions. It seems like something cp should do, but cp --preserve=... refers to the SOURCE attributes, not the TARGET ...
0
votes
0answers
29 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 ...
1
vote
0answers
33 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 ...
1
vote
1answer
6k 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
109 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
26 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 ...
51
votes
3answers
5k 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 ...
1
vote
0answers
329 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
101 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
65 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
2k 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
112 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
412 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
3k 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
370 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 ...
10
votes
4answers
66k 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
707 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
539 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
1k 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 ...
76
votes
2answers
198k 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
196 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 ...
2
votes
3answers
8k 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
214 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
298 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
307 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
1k 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,...
0
votes
1answer
567 views

Centos: Apache needs to read files created by Tomcat

After trying a lot of different solutions I came here for some help. I have a web apps in apache HTTPD which serve the frontend and a Java app in Tomcat in the same server. The thing is that the ...
0
votes
2answers
9k views

bad ownership or modes for chroot directory “/var/www”

I am getting following error in auth.log when trying to connect to site using SFTP. fatal: bad ownership or modes for chroot directory "/var/www" ls -ld of this directory shows this: drwxrwxr-x ...
0
votes
0answers
509 views

I accidentally chmod 700 /etc. And now I became I have no name user

Today, I accidentally do this in my web server, sudo chmod 700 /etc And now, I can no longer access to /etc folder. Because I am denied from using the /etc folder, I can no longer use the sudo ...
0
votes
1answer
3k views

Setting up a local development environment with nginx on Linux (ubuntu)

I recently moved to a new computer, and copied over all existing git repositories for webdevelopment projects from my old computer. On that old computer, I had installed apache to serve certain ...
0
votes
1answer
124 views

I can run compiled .go file without chmod

I am learning to program in google's Go language, I have a script: package main import "fmt" func main() { fmt.Println("Hello, World!") } So I compiled it with: go build /home/user/...
0
votes
2answers
240 views

How does bash make a file executable?

I know that when I run the command chmod +x filename bash will make my file an executable. What exactly happens to the architecture of the file to change it to an executable? i.e. how does the ...
2
votes
2answers
2k views

Allow root user to read, write execute, folder owner to read only, and everybody else to have no access to a folder ubuntu

I'm making a "wargame" similar to the ones on overthewire.org. I have the root user, Ubuntu, that should be able to read, write, and execute files in a folder. I have one user per folder that should ...
0
votes
1answer
4k views

launch transmission-daemon as root

have trouble with transmission daemon. I need to write files to external hdd, but always get Error: Permission denied Some guys write something about auto-mounting bug, but I can't mount it each time ...
1
vote
1answer
3k views

Is copying files from Windows to Cygwin harmful?

If I copy some files from windows to the /home folder of Cygwin, am I corrupting Cygwin file system? How about if some of these file are executable and I execute them in Cygwin /home folder? Should ...
1
vote
2answers
5k views

How to chmod all folders recursively excluding all folders within a specific folder?

I would like to chmod all folders and subfolders within a specific folder, except I wish to exclude one folder (and all subfolders it contains). What I have so far is a hack of the following ...
0
votes
2answers
1k views

How can I change file and directory permissions in one go via SSH?

I'm trying to use find in conjunction with -exec and chmod to recursively change the permissions on every file and directory inside a folder via SSH. I want to do these two commands in one line: ...
0
votes
2answers
41 views

UNIX owner 42286?

An AIX 6.1 server with a NFS share mounted worked for years but then changed owner on all of the files and folders on the mount from sbladmin to a 5 digit code: 42286. It didn't change the group but ...
0
votes
1answer
332 views

Permissions for file in Linux can't be changed by user of owner's group

I created a directory and placed a file in it from user1. Permissions for this file and directory is 070 for example. Then I created user2 and added him to user1 group. I try to use chmod 000 /home/...

1
2 3 4 5 6