Skip to Content
Menu
This question has been flagged
2928 Views

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
Discard
Related Posts Replies Views Activity
0
Aug 22
4838
0
Dec 20
12
2
Mar 25
5790
2
May 23
2325
0
Jul 21
2350