Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2953 Переглядів

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
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
серп. 22
4861
0
груд. 20
12
2
бер. 25
5825
2
трав. 23
2361
0
лип. 21
2372