CHMOD 777 - Operation not permitted [SOLVED]

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
jalokin
New here
Posts: 5
Joined: Sun Dec 21, 2014 7:41 pm

CHMOD 777 - Operation not permitted [SOLVED]

Post by jalokin »

Hello everyone and thank god that there is a qnap forum like this!

I am writing this post as the last option I have to find a solution for my problem.
I have set up a Qnap TS-453S Pro for a company I work for. I have updated to the latest firmware available and the NAS' primary mission is to run their web sites/webshops so I have set up a web server with database and ftp.

Heres the problem:
I can connect to the ftp without any trouble and upload files through the ftp. The files I upload can be CHMOD to whatever permissions I want to. So I uploaded the latest Prestashop to a virtual host defined on the server and installed the shopping system without any trouble.
But the problem is that when Prestashop "created" a file (a cache file for example) I am no longer able to change the permission for that specific file on the ftp server. It gives me a: Operation not permitted like below:

550 CHMOD 777 04f11a395a7438b5ebc4ee9f195655330424ab51.file.content.tpl.php: Operation not permitted

Then I tried installing a new template on Prestashop and the template installs correctly from within prestashop but the files are beeing "locked" so that I cannot delete or change the CHMOD on the files from the FTP server. Nor can Prestashop itself change the files anymore! Permission denied...

It seems like the files beeing created by the script is not setting the correct ownership which results in lockdown from FTP side.

But now to the funny part. I can easily change the file permissions from within the Qnap file manager, which gives me the rights to also change file permissions on the FTP file again. But as soon as Prestashop is updating the file, it locks me out and I can no longer change anything in the file!

Then I have moved the full webshop to an old Synology DS710+ that I keep under my bed in case Qnap would spank me hard, like for example right now...
On the DS everything seems to be working fine. Prestashop gives me no trouble with file permissions or ownerships on the FTP whatsoever!

I have searched the web for a solution and also this forum but I cannot find anything at all.

Am I the only one who experience this issue? Could it be a bug in the new Qnap firmware? And can it be solved in anyway?
Last edited by jalokin on Wed Apr 29, 2015 7:27 pm, edited 1 time in total.
jalokin
New here
Posts: 5
Joined: Sun Dec 21, 2014 7:41 pm

Re: CHMOD 777 - Operation not permitted

Post by jalokin »

I forgot to write that I use the latest 4.1.3 firmware (from 17/02/2015) on the NAS and that this firmware update has caused the issues.
Does anyone else experience this problem or is it only me?
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: CHMOD 777 - Operation not permitted

Post by schumaku »

Please provide the output of getacl for the folder and an example file, ... wild guess, adopt to the effective path:

# getfacl /share/Web/prestashop/cache/

and

# getfacl /share/Web/prestashop/cache/04f11a395a7438b5ebc4ee9f195655330424ab51.file.content.tpl.php
jalokin
New here
Posts: 5
Joined: Sun Dec 21, 2014 7:41 pm

Re: CHMOD 777 - Operation not permitted

Post by jalokin »

Hi schumaku
Thank you for the advise.

I have now done what you said but with the image folder with a prestashop generated file, which is a background image that was installed with a new theme that I installed directly in Prestashop. The file is somehow "locked" from the ftp client. I cannot delete or change it from the ftp client (FileZilla, latest version) but can do it from the file manager in the qnap admin area!

Code: Select all

[~] # getfacl  /share/Web/detledny/themes/specialdev213-bootstrap/img/
getfacl: Removing leading '/' from absolute path names
# file: share/Web/detledny/themes/specialdev213-bootstrap/img/
# owner: httpdusr
# group: administrators
user::rwx
group::r-x
other::r-x

Code: Select all

[~] # getfacl  /share/Web/detledny/themes/specialdev213-bootstrap/img/bg-main.jpg
getfacl: Removing leading '/' from absolute path names
# file: share/Web/detledny/themes/specialdev213-bootstrap/img/bg-main.jpg
# owner: httpdusr
# group: administrators
user::rw-
group::r--
other::r--
I don't understand what the problem is?
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: CHMOD 777 - Operation not permitted

Post by pwilson »

jalokin wrote:Hi schumaku
Thank you for the advise.

I have now done what you said but with the image folder with a prestashop generated file, which is a background image that was installed with a new theme that I installed directly in Prestashop. The file is somehow "locked" from the ftp client. I cannot delete or change it from the ftp client (FileZilla, latest version) but can do it from the file manager in the qnap admin area!

Code: Select all

[~] # getfacl  /share/Web/detledny/themes/specialdev213-bootstrap/img/
getfacl: Removing leading '/' from absolute path names
# file: share/Web/detledny/themes/specialdev213-bootstrap/img/
# owner: httpdusr
# group: administrators
user::rwx
group::r-x
other::r-x

Code: Select all

[~] # getfacl  /share/Web/detledny/themes/specialdev213-bootstrap/img/bg-main.jpg
getfacl: Removing leading '/' from absolute path names
# file: share/Web/detledny/themes/specialdev213-bootstrap/img/bg-main.jpg
# owner: httpdusr
# group: administrators
user::rw-
group::r--
other::r--
I don't understand what the problem is?
Do you have "“Advanced Folder Permissions”" enabled?

Image

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: CHMOD 777 - Operation not permitted

Post by schumaku »

pwilson wrote:I don't understand what the problem is?
Well, of course - no user except of the httpdusr has read+write+control (rwx on the folder) access - so currently only the Web server could change the attributes.

Best approach here is to use the NAS shell access and temporarily set the files and/or folders to 777.
jalokin
New here
Posts: 5
Joined: Sun Dec 21, 2014 7:41 pm

Re: CHMOD 777 - Operation not permitted

Post by jalokin »

Hi Patrick.

Thank you for the information and for your help.
I did not have the advanced folder permissions turned on. I turned it off when trying to find the error. Since when I made the post in here, Synology came with an update and now, after turning the advanced file permissions back on, it seems to have solved the problem with the permission denied on the ftp client. I have just tried uploading a logo from within Prestashop admin area and I can now delete that logo directly after from the FileZilla client! I could not do that before. So the problem amazingly seems to have been solved :DD

Thank you for your time and help.
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”