Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2937 Widoki

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
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
sie 22
4850
0
gru 20
12
2
mar 25
5810
2
maj 23
2347
0
lip 21
2368