Delete Files on EPIC /Unsecured via PAC Control

It looks like PAC Control is not able to delete files on the groov EPIC in /unsecured directory. I’m trying to use:

SendCommunicationHandleCommand(comm_handle “delete”);

Seemingly this is because the pac22 user does not have delete permission. Am I missing something? or is there a work around to delete files via PAC control?

I mean the alternative is just to use an FTP client, or groov Manage, or sftp / ssh commands through Node Red. It would just be convenient / clean to have my PAC control strategy manage the deletion and it feels like an issue that the SendCommunicationHandleCommand command doesn’t work correctly on EPIC.

Funny enough I ran into the same problem last week and eventually gave up thinking I was doing something wrong. Have you perhaps opened a support ticket?

edit: I get a value of ZERO returned to indicate the command executed correctly (which it didn’t)

1 Like

Is the write and execute +wx bits set on the /home/dev/unsecured folder for everyone?

I tested it on EPIC Firmware 2.0 (should be released in a few hours - hopefully) and it works as expected.
Here is the quick test code I used.

EDIT. Are you working in a directory, or the root of ‘unsecured’?
I tested in the root since we have a known issue with working in sub-directories.

Second EDIT. Here is the comm handle configuration.

Ah this is likely the source of my issue. I’m working in a subdir of unsecured but it is setup with pac22 as the owner.

admin@opto-04-74-f6:~$ ls -lh /home/dev/unsecured/
total 0
drwxrwsr-x 1 pac22 unsecured_files 0 Apr 30 13:28 DataLog
drwxrwsr-x 1 pac22 unsecured_files 0 Apr 30 13:27 EventLogs
drwxrwsr-x 1 pac22 unsecured_files 0 May 3 21:09 Profiles
drwxrwsr-x 1 pac22 unsecured_files 0 Apr 25 00:08 Settings

I’ll test in the /unsecured.

Super excited about 2.0!

Looks like I only had +r-x set for everyone… will test

Edit -
Tested deleting files within /unsecured and within /unsecured/subdir
All files and folders set to +rwx for everyone.

sudo chmod -R 777 /home/dev/unsecured
sudo chmod -R 777 /home/dev/unsecured/subdir

Comm handle set and opened using file:a,~/unsecured/file.txt or
file:a,~/unsecured/subdir/file.txt for each test.
Status was 0 after opening comm handle.
Status was -408 after trying to delete.

So at least on version 1.5.0-b.42 I am not able to delete.

@Jakes - I’ll wait and test on 2.0 before I submit a ticket but good point!

2 Likes