file permissions – “[ErrorException] chmod(): Operation not permitted” running “composer update”

I’m running Magento 2.4.2 and I’m using Composer v2.0.11. 2 days ago, after running, as usual, composer update, I suddenly received this error:

(ErrorException)
chmod(): Operation not permitted

You can see composer update -v output down below:

enter image description here

What I tried

  • I tried to apply chmod -R 777 . and chown -R www-data:www-data .
  • I tried to apply chmod u+x bin/magento

Any ideas?

macos – Developer of a tool says I need to run an exe file and chmod it on mac

I am trying to use a tool written to help convert output of one program to a file useable by another.

The tool when downloaded is a lot of files and a .exe file.

I assumed this is not the Mac version, but the developer says that it runs on Mac OS and I need to CHMOD +x it and it will run.

I can’t even get to the stage of trying that as my mac defaults to use the Unarchiver for .exe files. I have tried both SwiftDefaultApps and RCdefault apps to try and de-allocate the unarchiver to those files, but neither works.

I’ve changed the suffix manually to .app and tried to run that but am told “You can’t open the application because it is not supported on this type of Mac.”

I have dug into the terminal and think I have chmod -x the file.

Is there something I should be doing, or is it just that an exe just never going to work on a mac?

I’m a bit confused.

Thanks for any pointers.

permissions – User, Group and Other in the chmod command

I think I basically understood the point with the seven levels of authorization with the chmod command. However I’m not sure what is meant by user, group and other.
What’s the difference between group and other?
If I set chmod myFile 700 from me@myComputer, will I still have the right to access myFile from root@myComputer?
Under which circumstances can one user re-write the authorizations for a file when this user does not have write access on it (using sudo I guess, but I’m not sure)?
Thank you in advance

Sudo chmod gets permissions denied

When I run ls -l, the file I want to change permissions of is:

-rw-r--r-- 1 82176 1491 193716029663 Feb 16  2019 cfdna_hc_bam.bam

First try: chmod 775 cfdna_hc_bam.bam.
Result: chmod: changing permissions of 'cfdna_hc_bam.bam': Permission denied

Second try: sudo chmod 775 cfdna_hc_bam.bam. It asks for my password, I provide it and the Results: chmod: cannot access 'cfdna_hc_bam.bam': Permission denied.

When I enter cd .., ls -l, to see the permissions on the directory in which my file is, this is the result: drwxrwsr-x 1 93501 1491 8192 Sep 28 14:24 bam_files.

The only question I found similar is (Sudo chmod +x leads to “cannot access (file) permission denied”), and it had to do with a mounted image problem, which isn’t my case here.

Does anyone knows what is the cause for this?
Should more information be needed, let me know.

chmod issue – Incorrect Command Issued

From this linked post (answered by @dmourati):
How can I make a user and give read only access?

On a CentOS box

When attempting to create a readonly account, the command

chmod -R o+rx /

was executed under the root user.

A bunch of “Operation not Permitted” errors popped up before the command was quickly halted with

^C

Since this event the box is still operational (applications still work), but we can no longer SSH via PuTTY or WinSCP. I am thinking the SSH service was halted or broken. I am a novice Linux user, but it looks like the permissions were attempted to changed for the root user at the top directory.

We were thinking of rebooting the box on-site, but are concerned the box wouldn’t come back up at all (applications still work right now) if we did.

Is there another approach that should be taken to reverse the action taken? Thank you for any guidance here. It is greatly appreciated.

server – 20.04 – chmod not working on exfat mount

I have 2 internal HDDs formatted in exFAT – fstab as below

#INT-1TB-4K Internal HDD mount to /mnt/INT-1TB-4K
UUID=0E7E-6579 /mnt/INT-1TB-4K exfat defaults, permissions 0 0

#INT-1TB-BAK Internal HDD mount to /mnt/INT-1TB-BAK
UUID=3037-96B0 /mnt/INT-1TB-BAK exfat defaults, permissions 0 0

Running Ubuntu Server 20.04, for which kernel supports exFAT without the exfat-utils / fuse packages being present.

/mnt ls-all gives

exharris@plexserv:/mnt$ ls -all
total 520
drwxr-xr-x  4 root root   4096 Jul  2 09:32 .
drwxr-xr-x 20 root root   4096 Jul  2 05:15 ..
drwxr-xr-x  9 root root 262144 Jul  3 03:49 INT-1TB-4K
drwxr-xr-x  7 root root 262144 Jul  3 03:49 INT-1TB-BAK

I get permission denied errors in the terminal when trying to create files in these folders (unless I use ‘sudo’, of course). This is because the ‘others’ write bit is set to -.

When running sudo chmod -R 777 INT-1TB-4K from /mnt, I get no errors, but when doing ls -all again, nothing has changed.

This is causing me problems also as I have set these up as Samba shares and also cannot write to them from other machines.

I also tried sudo chmod -R o+w INT-1TB-4K – same thing happened.

Using Cygwin in Windows 10, chmod 600 does not work as expected?

ssh says:

Load key "C:\Users\me/.ssh/id_rsa": bad permissions
debug1: Trying private key: C:\Users\me/.ssh/id_dsa

So I try to fix the permissions using chmod 600 as is very standard on Linux systems:

me@DESKTOP-B7QCL2A /cygdrive/c/Users/me/.ssh
$ chmod 600 C:\Users\me/.ssh/id_rsa

But it does not work. ssh still reports bad permissions. Indeed, it seems that the chmod 600 command did nothing:

me@DESKTOP-B7QCL2A /cygdrive/c/Users/me/.ssh
$ ls -l C:\Users\me/.ssh/id_rsa
-rw-r--r-- 1 me me 887 May 31 18:58 'C:Usersme/.ssh/id_rsa'

I mean sometimes it works, if the file is in the home directory. I don’t know why .ssh isn’t in my home directory, it’s odd, but let’s not change the ssh configuration because I haven’t touched it, just trying to add a private key file. Let’s figure out how to fix permissions.

I tried all kinds of hacks suggested here, the setfacl, and the chgrp, none of it works.

Find pdf files in an unknown directory and chmod 744 them

I have a directory called mainDir with 4 subdirectories. I do not know in which of the four subdirectories my PDF files are located, as the user can choose which subdirectory my PDF files should be moved to. I want to chmod all 744 pdf files. So far I have written this find. -type f -name "* .pdf" chmod 744 {} ; But it did not work. Can you please help? thanks