MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Error: EACCES: permission denied

    Scheduled Pinned Locked Moved Troubleshooting
    9 Posts 2 Posters 3.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      Genosphere
      last edited by Genosphere

      So I am quite a bit rusty using Linux based OS and am encountering an error, or two, trying to install & run the program. Not sure where exactly the issue is steaming from and I followed all the directions to the letter, rebooted a few times, and still nothing.

      Downloaded and Installed as root, deleted electronics and tried to repair/re download as suggested and still nothing again.

      I think its a permission error, but not sure what exactly to change (or how if that’s the case).

      One of my attempts:

      root@GenospherePi:/MagicMirror# npm start
      
      > magicmirror@2.12.0 start /MagicMirror
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      sh: 1: ./node_modules/.bin/electron: not found
      npm ERR! code ELIFECYCLE
      npm ERR! syscall spawn
      npm ERR! file sh
      npm ERR! errno ENOENT
      npm ERR! magicmirror@2.12.0 start: `DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js`
      npm ERR! spawn ENOENT
      npm ERR! 
      npm ERR! Failed at the magicmirror@2.12.0 start script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /root/.npm/_logs/2020-08-18T17_33_01_418Z-debug.log
      root@GenospherePi:/MagicMirror# cd
      root@GenospherePi:~# cd /
      root@GenospherePi:/# rm -r MagicMirror
      root@GenospherePi:/# git clone https://github.com/MichMich/MagicMirror
      Cloning into 'MagicMirror'...
      remote: Enumerating objects: 12, done.
      remote: Counting objects: 100% (12/12), done.
      remote: Compressing objects: 100% (11/11), done.
      remote: Total 15875 (delta 2), reused 0 (delta 0), pack-reused 15863
      Receiving objects: 100% (15875/15875), 15.34 MiB | 1.41 MiB/s, done.
      Resolving deltas: 100% (9421/9421), done.
      root@GenospherePi:/# cd /MagicMirror
      root@GenospherePi:/MagicMirror# npm install
      
      > electron-chromedriver@6.0.0 install /MagicMirror/node_modules/electron-chromedriver
      > node ./download-chromedriver.js
      
      /MagicMirror/node_modules/electron-chromedriver/download-chromedriver.js:19
        if (err != null) throw err
                         ^
      
      Error: EACCES: permission denied, mkdir '/MagicMirror/node_modules/electron-chromedriver/.electron'
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! electron-chromedriver@6.0.0 install: `node ./download-chromedriver.js`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the electron-chromedriver@6.0.0 install script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /root/.npm/_logs/2020-08-18T17_36_46_469Z-debug.log
      root@GenospherePi:/MagicMirror# npm install -g npm
      /usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
      /usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js
      + npm@6.14.8
      added 17 packages from 3 contributors, removed 18 packages and updated 20 packages in 26.194s
      root@GenospherePi:/MagicMirror# ^C
      root@GenospherePi:/MagicMirror# ^C
      
      
      

      EDIT:
      Tried
      sudo chown -R [root]:[root] /MagicMirror
      Nothing

      Using a Pi4 with the pre-installed os provided.

      Tanks for any help,
      Skol

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Genosphere
        last edited by

        @Genosphere said in Error: EACCES: permission denied:

        Downloaded and Installed as root,

        never use sudo…
        never logon as root

        logon as some non- root user, pi is the default,
        then run the install script from here

        https://github.com/sdetweil/MagicMirror_scripts
        

        cut/paste one line

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        G 1 Reply Last reply Reply Quote 0
        • G Offline
          Genosphere @sdetweil
          last edited by

          @sdetweil said in Error: EACCES: permission denied:

          https://github.com/sdetweil/MagicMirror_scripts

          This is what I get from the install directions from the provided link:

          fatal: could not create work tree dir ‘MagicMirror’: Permission denied
          tee: /home/pi/install.log: Permission denied

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @Genosphere
            last edited by

            this is the install instructions

            to execute the install script, cut/paste this line into the terminal window on your device (I can’t say PI, cause it works in a lot of other places too)

            bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)"
            

            there is a log file, MagicMirror/install.log, created so we can be able to diagnose any problems

            anyhow… i can’t imagine what is messed up now… reflash the sd card and start again… logon as pi and run the script

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            G 1 Reply Last reply Reply Quote 0
            • G Offline
              Genosphere @sdetweil
              last edited by

              @sdetweil
              Already wiped it and trying again. Remember, i am bit of a noob with general command lines still. I figured I messed something up, but that is the beauty with this stuff. Im learning was not to do it. hahaha

              Whats the difference between the link on the main sites page versus the link you provided?

              Ill update with what happens soon.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @Genosphere
                last edited by

                @Genosphere nothing… I provided a link to the repo, which documents the commands to issue to do certain tasks…(then run the install script from here)

                the first task in the repo is the installation task, which is the second and actual command I posted.
                (to execute the install script, cut/paste this line into the terminal window on your device (I can’t say PI, cause it works in a lot of other places too))

                I am trying to figure out what the problem is, cause of late, it seems no one is able to read what I wrote for instructions.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • G Offline
                  Genosphere
                  last edited by

                  I did read the instructions with initial install of the os, but was still getting issues. The wipe proved to “fix” things and now its running.

                  “nothing… I provided a link to the repo, which documents the commands to issue to do certain tasks…(then run the install script from here)”

                  The reason I asked is because of the install instructions here versus the string you posted the install processes appeared completely different (without me using sudo on first install).

                  Any who, If i understand what the terminal is showing me, then to start and stop the MM so i can tweak things or access everything else Ill be using:

                  cd ~/MagicMirror
                  
                  pm2 start MagicMirror #to start
                  
                  #and
                  pm2 stop MagicMirror #to stop
                  

                  (Which does work)

                  Is there anything else that this"version" or method of install I should be concerned with when updating or adding on custom CSS stuff that I might have missed/overlooked?

                  Thanks for the help (typical user error).

                  S 2 Replies Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Genosphere
                    last edited by

                    @Genosphere said in Error: EACCES: permission denied:

                    The reason I asked is because of the install instructions here versus the string you posted the install processes appeared completely different (without me using sudo on first install).

                    the next section says

                    Alternative Installation Methods   
                    The following installation methods are not maintained by the MagicMirror² core team. Use these scripts and methods at your own risk.
                    
                    #Automatic Installation Scripts
                    Sam (@sdetweil, long time contributor of the MagicMirror² framework) maintains a easy to use installation and update script: https://github.com/sdetweil/MagicMirror_scripts
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @Genosphere
                      last edited by

                      @Genosphere the script adds the empty custom.css, and fixes misc problems on different platforms

                      pm2 --help

                      will show you all the commands,
                      you can use the name of the pm2 setup, or the number

                      pm2 restart MagicMirror
                      or
                      pm2 restart 0

                      is there anything else… ??

                      no. the objective is to get you up and running, ready for all the rest of the things to work …

                      read this
                      https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners?_=1597692865004

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy