Ir al contenido
Menú
Se marcó esta pregunta
2936 Vistas

Hi Guys,

I have a procedures that read a text file and write to Importlog.txt the mispelled words to it.

Once done, it immediately download to client downloads folders. Its work fine in my local computer. But in my linode hosted server, i have permission error. 

File "/opt/odoo12/odoo-custom-addons/hr_zk_attendance_pyzk/models/zk_machine.py", line 230, in import_device_employees # file_obj = open('Importlog.txt', 'w') PermissionError: [Errno 13] Permission denied: 'Importlog.txt'


-----------------------------------------------------------------------------

In my /etc/systemd/system/odoo12.service

[Unit]

Description = Odoo12

Requires = postgresql.service

After = network.target postgresql.service

[Service]

Type = simple

SyslogIdentifier = odoo12

PermissionsStartOnly = true

User = odoo12

Group = odoo12

ExecStart = / opt / odoo12 / odoo-venv / bin / python3 / opt / odoo12 / odoo / odoo-bin -c /etc/odoo12.conf

StandardOutput = journal + console


----------------------------------------
i access my hosted server by google chrome via url: 172.222.155.7:8069
Question: when i run this code: file_obj = open('Importlog.txt', 'w') in cloud server where does it writes? what directory should i change the permission?

Please help!
Hope for your kindness,
God Bless
Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
ago 22
4850
0
dic 20
12
2
mar 25
5810
2
may 23
2347
0
jul 21
2368