Questions tagged [chmod]

chmod is used to change the commonly used read, write, and execute permissions on files. It can change these permission bits for the file owner, the file's group owner, and everyone else. It can also change the more esoteric ‘permissions’ (attributes, reall) like set-user-ID, set-group-ID, and sticky bits.

48 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
1answer
270 views

Permissions on Files:

I would like to give 755 permissions to a directory, so I use: # chmod -R 755 /my/folder/ It works for all files inside my folder, but the problem is that I use scripts that create new files in this ...
4
votes
0answers
6k views

NFS exports all_squash,anonuid,anongid mapping all client users to owner on server (working) still needs world readable permissions on the server?

My /etc/exports on the NFS server: /home/username/Documents/some/folders/deep 192.168.1.10(rw,sync,all_squash,anonuid=1000,anongid=1000) This seems to be working as intended for the most part. ...
3
votes
1answer
991 views

Linux: Changing Permissions – No space left on device

I have an external drive. When I just plug the drive into the PC, with a default /etc/fstab file, the OS just detects it and it's there in the Dolphin browser. I can select it, I can navigate to it on ...
2
votes
1answer
1k views

Permission denied even though I own it and permissions are 777

I'm on Android using Termux and copied a file from my sdcard to my Termux home folder. (I use a file explorer app with root permissions for that..) Now having the file in my home dir I checked what my ...
2
votes
0answers
265 views

chmod and chown have no effect on mounted CIFS share, but emit no error either

I have an SMB share on a Buffalo NAS (nas01/storage) mounted on /storage. From /etc/fstab: //nas01/storage /storage cifs file_mode=0644,dir_mode=0750,uid=1000,gid=1000,passwd="XYZ" 0 0 It mounts ...
2
votes
1answer
213 views

Permissions (ACL) to allow creation of new files only - are extended attributes also needed?

I want to use a directory as a sort of drop-off point, similar to the Public folder in each Mac OS X home directory, that is: certain users (or everyone) should be able to create new files inside this ...
1
vote
0answers
82 views

Does Access Control lists override group or owner permissions?

I came across the following task: Add 3 new users - alice, bob, charles Create a new group - marketing - and add alice, bob and charles to that group Create a directory - /marketing - whose owner ...
1
vote
0answers
185 views

Confused about using `setuid` on a FreeBSD mounted dataset to ensure all files/dirs have a fixed owner?

Initially I thought that what I'm trying to do was simple. But the more I look at FreeBSD man pages, the more confused I'm getting about whether it's even possible. I have a zfs pool that is used for ...
1
vote
0answers
424 views

vsftpd with virtual users and independent directory configuration

I followed the nice tutorial from https://askubuntu.com/questions/575523/how-to-setup-virtual-users-for-vsftpd-with-access-to-a-specific-sub-directory Now If I understood I have 2 things: 1) one is ...
1
vote
1answer
442 views

Sync files with permissions from linux to windows?

Is it possible to sync files from a linux machine with a given permission set (for instance, 700) to a windows machine (having a ntfs partition) and still retain linux permissions? I know that copying ...
1
vote
0answers
76 views

Permissions not getting assigned from parent directory when creating new sub directory

The issue for me when we I create a new subdirectory , it is not copying the execute permissions for group from parent directory . Permissions are as follows: Parent Directory: $ ls -ld /data/share/...
1
vote
0answers
180 views

Setting umask for a user with no shell?

How can I set the umask for the Apache user to have files default to -rwxrwx--- ? I have an application that wants one directory to have either 0750 or 0770 permissions, which is great if it’s local, ...
1
vote
0answers
951 views

How can I set device rw permissions permanently on ubuntu 16.04?

I am using an embedded device that is running ubuntu. Normally only root has read and write permissions for i2c devices. I'm using this command to add i2c r/w permissions for normal user (me): sudo ...
1
vote
0answers
317 views

FreeBSD permissions/ACL issue?

I'm a bit green with permissions/ACLs on FreeBSD 11, but this is puzzling me. root@svr: # su root@svr: # id uid=0(root) gid=0(wheel) groups=0(wheel) root@svr: ls -lt -rwxrwxr-x+ 1 root wheel 505 ...
1
vote
0answers
89 views

Ideal Linux ACL setup for ransomware

CAVEAT: This is mostly an intellectual exercise, since in case my user would get compromised, there is an entire cascade of events that could make this protection mechanism totally useless. ...
1
vote
2answers
124 views

Does busybox chmod 03755 generate any disk write I/O when directory permissions are already set correct?

I am writing a startup script for a daemon that runs inside an embedded Linux installation. That means that chmod is from BusyBox v1.24.2. I don't want to cause any unnecessary write cycles on flash ...
1
vote
1answer
6k views

Changing permissions of the file, while using sftp command in a shell script

How can I change the permissions of the file/command, while using the sftp command via a shell script? My sftp connection is established, but it fails while executing the chmod command. As of now, I ...
1
vote
0answers
631 views

rsync + chmod only selected files

I'm trying to sync specific cron files between 2 servers and change the permissions for them. However, the command I am trying is also changing the permissions on the main directory. Command used: ...
1
vote
2answers
833 views

Find all .php files inside directories with writable permissions

I'm looking for a linux command to scan through all writable directories on the server and show ones with .php and .html files inside them. Something like: find -type d -writable -exec find {} -...
1
vote
0answers
102 views

Centos 7 FTP Hidden Directory Issue

After setting up Centos 7 with a web server standard install and LAMP stack. I installed vsftpd. Everything works fine and configured it to accept passive to enable gui ftp programs. However, when ...
1
vote
0answers
5k views

tracking directory permission changes

Permission of a certain directory named 11203 got changed twice because of which the hosted app encountered some problems. When I used the command: ausearch -i |grep chmod |grep 11203 I got the ...
1
vote
1answer
315 views

How to give permission to group to read/edit unowned files on archlinux?

I'd like to be able to read files from external hdd or other partitions without having to su root every time or chmod the whole partition to myself/group. How can I give myself/group permission to ...
1
vote
0answers
2k views

Save motion output videos in USB Drive

I'm using a USB drive in my Raspberry to store my website. Now I want also save my videos made with motion. I wasn't able to save in a folder different from /tmp/motion so googling I found I had to ...
1
vote
1answer
4k views

Readonly file and can't change permissions

There is a file with read only permissions, but even root can't chmod it. Permissions of the file: -rw-r--r-- After trying to chmod 777: chmod: changing permissions of ‘motd’: Operation not ...
0
votes
0answers
105 views

Accidentally ran `chmod -R 755 *`. Is the situation desperate?

[Edit: See full list of commands I ran at the bottom.] I accidentally ran chmod +x * inside ~/.config which contained two .sh file that I wanted to make executable. There is no prompt for password ...
0
votes
1answer
44 views

Set default permissions for new files and folders

I have an upload directory which has information fed into it by users, each time a user registers they submit a picture which creates a folder for them in the upload directory and stores their photo(s)...
0
votes
0answers
13 views

SetGID on folder with Active Directory users

I have a directory which staff are allowed to sftp into on an Ubuntu 18.04 server. The directory is root:www-data owned (it's a web server) and I've set chmod +t and chmod g+s so data cannot be ...
0
votes
0answers
36 views

Chromeos Linux Beta

I am attempting to install Krita on my chromebook. I have 'turned on' linux beta and chromeos prompts me that 'Shared folders are available in Linux at /mnt/chromeos...' Issue debian@penguin:/mnt/...
0
votes
0answers
22 views

How do I change permissions for only the folder and no subfolders or files contained therein?

I need to change permissions for a root folder, then change them straight back. All permissions for everything else should stay the same. So, I need to find out current permissions change them to ...
0
votes
0answers
27 views

Permission setup for two different groups of users in the same directory

I need to find the optimal permissions layout for the following use case: There is a AIX machine used for collaborating on software projects. Each project has its own sub-directory. For each project,...
0
votes
1answer
35 views

What happens if we, recursively, change folder permissions after changing files in it?

What will these below commands actually do? chmod 777 /yoda/htdocs/cups/logs/* chmod -R -f 777 /yoda/htdocs/cups/logs/ When I check the file permissions in ..../logs folder, they are showing as -...
0
votes
1answer
177 views

Give program access to only directories below cwd

Say I run a program like so: cd foo && program x y z How can I give program access to only the directories in foo and below? Pretend my fs looks like: $HOME/ foo/ bar/ baz/ if I run ...
0
votes
0answers
18 views

Automatic rights change when virtual COM ports are enumerated

I am developing a uC device which enumerates as three virtual COMs (actually it is a composite device). Everything works perfect except one small thing. Those ports belong to the dialout group and can ...
0
votes
1answer
474 views

How to give permissions to a subfolder while denying access to folders above it

I have this structure: /home/the_user/folder/subfolder and I would like to have read and write access to it, but I want to be unable to read or write anything above it, that is /home/the_user/...
0
votes
0answers
547 views

chmod does not change the folder permissions on an NTFS filesystem

I have recently installed Debian 9, and I have been facing many problems since then. The hard drive was previously used for a Windows install, and is not completely formatted, so it contains two ...
0
votes
0answers
36 views

User Permissions Reverting After Save

I am using Redhat 6.9. I don't have root permissions. I have created a bash script called "script" (no extension). When I use chmod +x script to make it executable, I can run the script successfully....
0
votes
0answers
274 views

SETUID and SETGID Behavior

The setup: ~$ ls -l /etc/sudoers -r--r----- 1 root root 614 2017-09-10 20:29 /etc/sudoers ~$ ls -l /etc/shadow -rw-r----- 1 root shadow 794 2011-04-18 11:49 /etc/shadow $ ls -l $(which ht) -rwsr-sr-...
0
votes
1answer
87 views

Solaris file permissions not inherited by OAG log files

OS: Oracle Solaris 11.3 SPARC Issue: I'm trying to inherit file permissions using ACL and it's partially working. For the files and directories I create on my own in the shell permissions are ...
0
votes
1answer
338 views

Centos 7 --> Logging Failed Permission Changes By Another User?

I've been trying to figure this one out and it seems like a rather easier said than done situation. I am currently setting up a server that sends errors, failed logons, who accessed what and when, etc....
0
votes
1answer
227 views

Cannot Bash chgrp GROUP /home/*/SOMEFILE/ How to do it?

So am setting a code that will change group owner of the file to a specific group. PS there are more than 10 users, with same folder and file structure, and i want change the ownership of a specific ...
0
votes
1answer
262 views

Samba unix permissions messed up despite mask

I'd like to configure a share on a standalone samba serve where users have rw to their own files, but r to others in the same group (rwx and rx on folders respectively). It works well when users ...
0
votes
1answer
127 views

Change Permissions for a Specific User

Im new here. I have a question about changing permissions of a file. We have user1 user2 user3 and we have a "xx" file. xx files remoting by root and group1. ı have to give a writable and readable ...
0
votes
1answer
177 views

Dandelion List Listener Fails

I am trying to use lisp in linux but I can not get the listener to work. Using Eclipse's menu, in help -> install new software, I installed the dandelion plugin but every time I try to run lisp code, ...
0
votes
0answers
703 views

Permissions set to 755 but I cannot access folder

I want to access some files in a folder that I created in a server. I have changed the file permissions recursively to 755, which basically should allow everyone to read and execute files, but this is ...
0
votes
0answers
226 views

Prevent other users from reading my files

I have 2 users: Joe is root and Gary (normal user). But if Gary enters 'cat /home/joe/function.php', he can view all code with mysql password into this file. What is the solution for disabling all ...
0
votes
0answers
394 views

kickstart does not chmod a file in %post section

I have the following code executed in the %post section of a kickstart file for RHEL 6.6. echo '#!/bin/sh' > /root/add_user echo 'if [ $# -lt 1 ]; then echo "no username provided"; exit 1; fi' &...
-1
votes
1answer
2k 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
votes
2answers
54 views

Why would a user not be able to delete a file they created

Reposting the question about deleting a file. We have a script that is used to transfer files between two SCO Unix systems. The script has been rock solid for years. Recently the firewall unit at ...