robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
120 stars 12 forks source link

Mudslide permission #82

Closed Anayaali2019 closed 4 months ago

Anayaali2019 commented 4 months ago

In Linux mudslide use to create its folders with su user or sudo command Make something that it will create all its files in same working directory to prevent permission issues Here i am trying to execute mudslide with shell command

"node:fs:1349 handleErrorFromBinding(ctx); ^ Error: EACCES: permission denied, mkdir '/var/www/.local/share/mudslide' at Object.mkdirSync (node:fs:1349:3) at Object.mkdirSync (pkg/prelude/bootstrap.js:1639:33) at initAuthStateCacheFolder (/snapshot/dist-ncc/index.js:276:12) at /snapshot/dist-ncc/index.js:283:81 at Generator.next () at /snapshot/dist-ncc/index.js:235:71 at new Promise () at /snapshot/dist-ncc/index.js:231:12 at initWASocket (/snapshot/dist-ncc/index.js:282:12) at /snapshot/dist-ncc/index.js:350:30 { errno: -13, syscall: 'mkdir', code: 'EACCES', path: '/var/www/.local/share/mudslide' }"

Anayaali2019 commented 4 months ago

Fixed ... $output =$output . shell_exec('MUDSLIDE_CACHE_FOLDER=/var/www/html/ ./mudslide 2>&1'); echo $output;

robvanderleek commented 4 months ago

Great you were able to resolve this yourself @Anayaali2019 ⚠️ Be careful though not to store the cache folder in a publicly accessible location as the cache folder contains your WhatsApp credentials.