Bug 1475302 - useless check of permissions
Summary: useless check of permissions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: caja
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Wolfgang Ulbrich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-26 12:14 UTC by Jens Bauernfeind
Modified: 2022-12-10 17:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-10 17:18:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jens Bauernfeind 2017-07-26 12:14:30 UTC
Description of problem:

caja tries to set Permissions of $HOME/.config/caja to 755 and fails due to NetApp NTFS security style
Our home directories are qtrees lying on a NetApp volume on a NetApp Filer.
The NetApp FIlesystem provides multiprotocol access, so both NFSv4 and CIFS are possible on the same data.
For settings ACLs, there exist three so called "security styles": ntfs, unix, mixed
NTFS: you can set the permissions via windows explorer security tab. When you want to access a file from unix/linux, the NetApp Filesystem maps the permissions to fit.
UNIX: you can set the permissions via chmod from linux. When you want to access a file from CIFS, the NetApp Filesystem maps the permissions to fit.
Mixed: both worlds can set permissions, but you are advised to not use this mode, as one style can overwrite the other one.

As the homedirectories are normally accessed by windows, we decide to use the ntfs style.
A file in windows, where I have full permission on, maps in linux to "-rwx------"/ 700
Even every directory in my homedir maps to "drwx------"/700.
Now here is the problem, caja tries to modify the permissions of his folder in $HOME/.config/caja to "drwxr-xr-x" / 755, and it fails as linux is forbidden to set permissions.

I think it has something to do with this one
https://github.com/mate-desktop/caja/blob/master/libcaja-private/caja-file-utilities.c#L84
Why it is important to setup the dir as 755, as home directory in linux is normally created as 700?
So even if the caja folder can reached by other users, the home directory not, so I don't see a reason for this.

Version-Release number of selected component (if applicable):
caja-1.16.6-1.el7.x86_64

How reproducible:
easy with local users
not so easy with remote folders, as they are not so many users with multiprotocol access I think ;-)

Steps to Reproduce:
As normally people doesnt have a netapp filer, try the following:
1. create a test user with local homedirectory and login there with mate active (I do this via vnc).
2. A folder $HOME/.config/caja is created ,with permission 755.
3. Exit from mate (in my example kill the vnc session) and change the permission of the folder to 700 (for example via SSH)
4. Start VNC again, and the folder is changed back to 755

Actual results:
caja fails to start as it tries forever to set the $HOME/.config/caja permission to 755

Expected results:
ignore the mode bits, just check if the user has write access to the folder

Additional info:

Comment 1 Jens Bauernfeind 2017-07-26 12:15:49 UTC
https://github.com/mate-desktop/caja/issues/820

Comment 2 Jens Bauernfeind 2017-07-27 09:44:27 UTC
Ok, I can workaround this.
It is possible to ignore the chmod requests from the linux system (it gets an "OK, you have set the perms", but in reality the perms stays the same).

Comment 3 Wolfgang Ulbrich 2019-01-06 15:43:21 UTC
New maintainer is wanted for MATE epel7 repo!

Comment 4 Wolfgang Ulbrich 2022-12-10 17:18:07 UTC
Epel7 will never become an Mate update. Updrade to rhel8 or 9.


Note You need to log in before you can comment on or make changes to this bug.