コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2934 ビュー

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
アバター
破棄
関連投稿 返信 ビュー 活動
0
8月 22
4850
0
12月 20
12
2
3月 25
5809
2
5月 23
2347
0
7月 21
2366