[GH-ISSUE #1484] chmod/chown/mkdir: Operation not permitted as root #778

Closed
opened 2026-03-04 01:48:42 +03:00 by kerem · 1 comment
Owner

Originally created by @sharmad on GitHub (Nov 25, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1484

Additional Information

The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD

Version of s3fs being used (s3fs --version)

Amazon Simple Storage Service File System V1.79 with OpenSSL (both servers)

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

Version : 2.9.4 (both servers)

Kernel information (uname -r)

4.14.186-110.268.amzn1.x86_64 (server 1)
4.14.33-51.37.amzn1.x86_64 (server 2)

GNU/Linux Distribution, if applicable (cat /etc/os-release)

NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
(same for both servers)

Details about issue

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/
chown: changing ownership of ‘/s3mnt/outliers/’: Operation not permitted

[root@preprod-1 ]# chmod -x /s3mnt/outliers/
chmod: changing permissions of ‘/s3mnt/outliers/’: Operation not permitted

[root@preprod-1 ]# cd /s3mnt/outliers

[root@preprod-1 outliers]# mkdir test2
mkdir: cannot create directory ‘test2’: Operation not permitted

[root@preprod-1 ]# ls -ld /s3mnt/outliers
drwxrwxrwx 1 brutus brutus 0 Aug  2  2017 /s3mnt/outliers

[root@preprod-1 ]# ls -ld /s3mnt/
drwxrwxrwx 1 brutus brutus 0 Jan  1  1970 /s3mnt/

[root@preprod-1 ]# sestatus
SELinux status:                 disabled

Server 2:

[root@prod-1-1 via]# ls -ld /s3mnt/outliers
d--------- 1 brutus brutus 0 Jan  1  1970 /s3mnt/outliers

[root@prod-1-1 via]# ls -ld /s3mnt/
drwxrwxrwx 1 brutus brutus 0 Jan  1  1970 /s3mnt/

[root@prod-1-1 via]# cd /s3mnt/outliers

[root@prod-1-1 outliers]# mkdir test2

[root@prod-1-1 outliers]# ls -ld test2/
drwxr-xr-x 1 brutus brutus 0 Nov 25 12:45 test2/

[root@prod-1-1 outliers]# chmod -x /s3mnt/outliers/test2/

[root@prod-1-1 outliers]# ls -ld test2/
drw-r--r-- 1 brutus brutus 0 Nov 25 12:45 test2/

[root@prod-1-1 outliers]# chown root:root test2

[root@prod-1-1 outliers]# ls -ld test2/
drw-r--r-- 1 brutus brutus 0 Nov 25 12:45 test2/

[root@prod-1-1 ]# sestatus
SELinux status:                 disabled

Mounted as rw per mount cmd on both servers. Both servers have identical /etc/fstab.

Setup on both servers is identical:

lrwxrwxrwx   1 root   root      14 May 21  2018 s3mnt -> /storage/s3mnt 
drwxr-xr-x   7 brutus brutus  4096 May 21  2018 storage 

# mount 
s3fs on /storage/s3mnt type fuse.s3fs (rw,relatime,user_id=0,group_id=0,allow_other) 

When changing permissions on the mountpoint I get the expected changing ownership of Input/output error. So it's not that. Wish it was :(

What else can I check to find out why I am running into the above issues on one server but not the other?

Originally created by @sharmad on GitHub (Nov 25, 2020). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1484 ### Additional Information _The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all._ _Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD_ #### Version of s3fs being used (s3fs --version) Amazon Simple Storage Service File System V1.79 with OpenSSL (both servers) #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) Version : 2.9.4 (both servers) #### Kernel information (uname -r) 4.14.186-110.268.amzn1.x86_64 (server 1) 4.14.33-51.37.amzn1.x86_64 (server 2) #### GNU/Linux Distribution, if applicable (cat /etc/os-release) NAME="Amazon Linux AMI" VERSION="2018.03" ID="amzn" ID_LIKE="rhel fedora" VERSION_ID="2018.03" PRETTY_NAME="Amazon Linux AMI 2018.03" ANSI_COLOR="0;33" CPE_NAME="cpe:/o:amazon:linux:2018.03:ga" HOME_URL="http://aws.amazon.com/amazon-linux-ami/" (same for both servers) ### Details about issue 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/ chown: changing ownership of ‘/s3mnt/outliers/’: Operation not permitted [root@preprod-1 ]# chmod -x /s3mnt/outliers/ chmod: changing permissions of ‘/s3mnt/outliers/’: Operation not permitted [root@preprod-1 ]# cd /s3mnt/outliers [root@preprod-1 outliers]# mkdir test2 mkdir: cannot create directory ‘test2’: Operation not permitted [root@preprod-1 ]# ls -ld /s3mnt/outliers drwxrwxrwx 1 brutus brutus 0 Aug 2 2017 /s3mnt/outliers [root@preprod-1 ]# ls -ld /s3mnt/ drwxrwxrwx 1 brutus brutus 0 Jan 1 1970 /s3mnt/ [root@preprod-1 ]# sestatus SELinux status: disabled Server 2: [root@prod-1-1 via]# ls -ld /s3mnt/outliers d--------- 1 brutus brutus 0 Jan 1 1970 /s3mnt/outliers [root@prod-1-1 via]# ls -ld /s3mnt/ drwxrwxrwx 1 brutus brutus 0 Jan 1 1970 /s3mnt/ [root@prod-1-1 via]# cd /s3mnt/outliers [root@prod-1-1 outliers]# mkdir test2 [root@prod-1-1 outliers]# ls -ld test2/ drwxr-xr-x 1 brutus brutus 0 Nov 25 12:45 test2/ [root@prod-1-1 outliers]# chmod -x /s3mnt/outliers/test2/ [root@prod-1-1 outliers]# ls -ld test2/ drw-r--r-- 1 brutus brutus 0 Nov 25 12:45 test2/ [root@prod-1-1 outliers]# chown root:root test2 [root@prod-1-1 outliers]# ls -ld test2/ drw-r--r-- 1 brutus brutus 0 Nov 25 12:45 test2/ [root@prod-1-1 ]# sestatus SELinux status: disabled Mounted as `rw` per `mount` cmd on both servers. Both servers have identical `/etc/fstab`. Setup on both servers is identical: lrwxrwxrwx 1 root root 14 May 21 2018 s3mnt -> /storage/s3mnt drwxr-xr-x 7 brutus brutus 4096 May 21 2018 storage # mount s3fs on /storage/s3mnt type fuse.s3fs (rw,relatime,user_id=0,group_id=0,allow_other) When changing permissions on the mountpoint I get the expected changing ownership of Input/output error. So it's not that. Wish it was :( What else can I check to find out why I am running into the above issues on one server but not the other?
kerem closed this issue 2026-03-04 01:48:43 +03:00
Author
Owner

@sharmad commented on GitHub (Nov 26, 2020):

It turned out to be an issue with S3 bucket policy denying access to the S3 mount.

Closing this.

<!-- gh-comment-id:734324109 --> @sharmad commented on GitHub (Nov 26, 2020): It turned out to be an issue with S3 bucket policy denying access to the S3 mount. Closing this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#778
No description provided.