Welcome Guest, Not a member yet? Register   Sign In
chmod(): Operation not permitted
#1

I am having problems with CI4 in wsl2. When I try to login with codeigniter shield it returns this message:
[Image: Error-Exception.png]
The permissions on the folder I think are fine, because the file is created:
[Image: wsl2.png]


how can I solve that?
Reply
#2

(This post was last modified: 05-22-2023, 09:53 AM by captain-sensible.)

zero bytes though in that session file ? 0600 will only give read, write to owner - code line 147 (which is the same as mine ). Your on ubuntu i'm guessing . when you set up dev did you :

Code:
sudo chmod 777 writable -R

if i use this in a controller
Code:
    $session = \Config\Services::session();


i get a file


Code:
-rw------- 1 http   http   76 May 22 17:42 ci_sessionfq81lt941bvmqh02gv9hvcn1ae1khlaj

Now the interesting thing is the owner and group is http:http in Arch linux in the httpd.conf file it says the owner is
http:http so thats consistent . Also the permissions of the session fiel is -rw-------- which is consistent with the 0600 in the FileHandler .php

So on your web dev Ubuntu ? in httpd.conf what does it say for the owner ? i'm guessing www-data:www-data

you have root:root on your 0 byte session file . So i think thats a clue to the problem
CMS CI4     I use Arch Linux by the way 

Reply
#3

"wsl2" is Windows Subsytem for Linux? I tried working with that last year and gave up.
As I recall my problems were related to file permissions.
Reply
#4

(a pinch of salt/ toungue in cheek )i wonder if as Baldrick from black adder might once have said - oh its a cunning plan from the makers of windows- put an abonimation of linux on Windows , and make sure it doesn't work. That will put off potential Linux users ha ha ! But if your on Windows why would someone then play with windows linux sub system ? I mean you can just get a full install of linux on a cheap laptop
CMS CI4     I use Arch Linux by the way 

Reply
#5

(05-22-2023, 12:00 PM)captain-sensible Wrote: (a pinch of salt/ toungue in cheek )i wonder if as Baldrick from black adder might once have said - oh its a cunning plan from the makers of  windows- put an abonimation of linux on Windows , and  make sure it doesn't  work. That will put off potential Linux users ha ha !  But if your on Windows why would someone then play with windows linux sub system  ?  I mean you can just get a full install of linux  on a cheap laptop

I had been using VirtualBox on the Windows machine to create Linux servers, matching whatever web servers my clients had. But it started giving me problems. I don't recall all the details but I was pressed for time and needed something quickly. I became aware of WSL, and being the curious type, decided to try it. It works for simple stuff but I must have asked too much of it. I know it was a CodeIgniter site I was working on and the problems were related to Windows not recognizing Linux permissions. Anyway, learned my lesson. Went back to VirtualBox and sorted out whatever it's problem was. I'm now using a client-supplied MacBook Pro and love it. The Windows machine is once again devoted to accounting, browser checks and occasional zoom meetings.
Reply
#6

See Chmod/Chown WSL Improvements - Windows Command Line
https://devblogs.microsoft.com/commandli...rovements/
Reply
#7

Impossible, in the end I ended up installing xampp, the strange thing is that I have the problem with wsl2 and codeigniter, for my work I can use wsl without problems with pure php.
Reply
#8

If runnig Windows Subsystem for Linux, try to run service with same user. From example I see user www-data. In that case run service with user. Also if use spark use for example "sudo -u www-data php spark". The best solutions is to install virtual box for windows and install full linux dirstribution.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB