Re: Write to file #agl #koi #permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Francesco,

What's the path of the file? Do you have write permissions (DAC & SMACK) on it?

Try to write in a public dir (for example /tmp), and in the service working dir,
which should be writable for the service only.

HTH
---
Stephane Desneux - CTO - IoT.bzh
stephane.desneux@xxxxxxx - www.iot.bzh

On 05/07/2021 16:33, Francesco ARGENTIERI (KINETON) wrote:
> Hi everyone, I developed a custom service, now I want to save the current status
> as a JSON file.
> The code seems to work fine, but the result is a blank file. How it is possible?
> Can you help me? My code is shown below:
> 
> |void writeFile(){ std::ofstream o(f); o << std::setw(4) << out << std::endl;
> o.close(); } |
> 
> The blank file has already installed together with the service.
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9284): https://lists.automotivelinux.org/g/agl-dev-community/message/9284
Mute This Topic: https://lists.automotivelinux.org/mt/83998229/2167316
Mute #permissions:https://lists.automotivelinux.org/g/agl-dev-community/mutehashtag/permissions
Mute #koi:https://lists.automotivelinux.org/g/agl-dev-community/mutehashtag/koi
Mute #agl:https://lists.automotivelinux.org/g/agl-dev-community/mutehashtag/agl
Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx
Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/2167316/883735764/xyzzy [list-automotive-discussions82@xxxxxxxxxxx]
-=-=-=-=-=-=-=-=-=-=-=-





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux