• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

./nodebb setup Permission denied

Scheduled Pinned Locked Moved NodeBB Development
17 Posts 6 Posters 3.4k Views
    • 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.
  • P Offline
    P Offline
    pawan patil
    wrote on last edited by
    #1

    when i enter ./nodebb setup i get Permission denied error on centos 7
    please help me out

    teh_gT 1 Reply Last reply
    0
  • teh_gT Offline
    teh_gT Offline
    teh_g
    replied to pawan patil on last edited by
    #2

    @pawan-patil Did you download the files as sudo/root or something?

    1 Reply Last reply
    0
  • P Offline
    P Offline
    pawan patil
    wrote on last edited by
    #3

    @teh_g yes I download the files as sudo/root

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #4

    Delete the files and restart without sudo or root

    1 Reply Last reply
    0
  • Wojciech LisikW Offline
    Wojciech LisikW Offline
    Wojciech Lisik
    wrote on last edited by
    #5

    try with sudo like sudo ./nodebb setup

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #6

    Using sudo/root when installing NodeBB is incompatible with running NodeBB from another user.

    Don't use sudo when running git clone, when running npm i, or when running any command involving ./nodebb.

    Wojciech LisikW 1 Reply Last reply
    0
  • Wojciech LisikW Offline
    Wojciech LisikW Offline
    Wojciech Lisik
    replied to PitaJ on last edited by
    #7

    @pitaj if thats the case, than how on Earth installer is going to modify system files?

    teh_gT 1 Reply Last reply
    -1
  • teh_gT Offline
    teh_gT Offline
    teh_g
    replied to Wojciech Lisik on last edited by
    #8

    @wojciech-lisik said in ./nodebb setup Permission denied:

    @pitaj if thats the case, than how on Earth installer is going to modify system files?

    The setup process doesn't need to modify system files.

    1 Reply Last reply
    0
  • Wojciech LisikW Offline
    Wojciech LisikW Offline
    Wojciech Lisik
    wrote on last edited by
    #9

    Installer puts *.js into /usr/ and ls -alh /usr gives root:root as an owner, so......

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to Wojciech Lisik on last edited by
    #10

    @wojciech-lisik what does what exactly? Every file created by NodeBB is purely relative to the installation directory (wherever you git cloned).

    1 Reply Last reply
    0
  • julianJ Online
    julianJ Online
    julian GNU/Linux
    wrote on last edited by
    #11

    As @pitaj is advocating, you should not be running or installing NodeBB as root.

    As a root user (or using sudo), fix the permissions by running the following chown -R myuser:myuser /path/to/nodebb, replacing myuser and the path to NodeBB as necessary.

    Then drop out of root and resume setup ./nodebb setup

    1 Reply Last reply
    0
  • BriB Offline
    BriB Offline
    Bri Community Rep
    wrote on last edited by Bri
    #12

    @julian Honestly, I wouldn't chmod, just delete and reinstall (or move) in a more appropriate location, and then adjust permissions (if still necessary).

    @Wojciech-Lisik You shouldn't install programs in /usr/, but rather something more like /usr/local/opt/ or, ideally, some subdirectory under your user's home directory (for development). If you're setting up a production server, you'd want to create some directory structure under /etc/ owned by a special, non-root user with the least privilege possible. Most of my setups follow the paradigm of storing server files hosted by NGINX under /usr/share/nginx/ and setting rwx privileges to the special user I set up only in that folder.

    You should never have to use sudo or the root login to install nodebb (or any other web software, for that matter), and doing so can be a huge security risk.

    Here's a neat Superuser answer that outlines what the intended usage of each folder in a *nix machine is for.

    Wojciech LisikW 1 Reply Last reply
    0
  • Wojciech LisikW Offline
    Wojciech LisikW Offline
    Wojciech Lisik
    replied to Bri on last edited by
    #13

    @bri said in ./nodebb setup Permission denied:

    @julian Honestly, I wouldn't chmod, just delete and reinstall (or move) in a more appropriate location, and then adjust permissions (if still necessary).

    @Wojciech-Lisik You shouldn't install programs in /usr/, but rather something more like /usr/local/opt/ or, ideally, some subdirectory under your user's home directory (for development). If you're setting up a production server, you'd want to create some directory structure under /etc/ owned by a special, non-root user with the least privilege possible. Most of my setups follow the paradigm of storing server files hosted by NGINX under /usr/share/nginx/ and setting rwx privileges to the special user I set up only in that folder.

    You should never have to use sudo or the root login to install nodebb (or any other web software, for that matter), and doing so can be a huge security risk.

    Here's a neat Superuser answer that outlines what the intended usage of each folder in a *nix machine is for.

    Nice write but really dont even try to teach me how things should be done in IT. I have setup 1k+ servers in my career and I really have indepth knowledge of how public-facing server should be architectured.

    @julian @PitaJ and other wise-heads :: how installer is supposed to write sth to folder which access to is limited by permissions? The only way is to use sudo and change ownership of installed file/s aftewards.

    BriB 1 Reply Last reply
    -1
  • julianJ Online
    julianJ Online
    julian GNU/Linux
    wrote on last edited by julian
    #14

    Which part of "as a root user (or use sudo)" didn't you understand?

    Instead of harping on about the "1k+" servers you've set up, how about you respect your fellow community members and stop being an ass.

    1 Reply Last reply
    3
  • BriB Offline
    BriB Offline
    Bri Community Rep
    replied to Wojciech Lisik on last edited by
    #15

    @wojciech-lisik said in ./nodebb setup Permission denied:

    I really have indepth knowledge of how public-facing server should be architectured.

    You obviously don’t. And now I fear for the customers of those 1k+ servers you’ve set up.

    You don’t happen to work for Equifax, do you?

    Wojciech LisikW 1 Reply Last reply
    2
  • Wojciech LisikW Offline
    Wojciech LisikW Offline
    Wojciech Lisik
    replied to Bri on last edited by
    #16

    @bri said in ./nodebb setup Permission denied:

    @wojciech-lisik said in ./nodebb setup Permission denied:

    I really have indepth knowledge of how public-facing server should be architectured.

    You obviously don’t. And now I fear for the customers of those 1k+ servers you’ve set up.

    You don’t happen to work for Equifax, do you?

    No, I dont work for Equifax.... I work for completely different company.
    Nothing to fear about, trust me 🙂

    1 Reply Last reply
    0
  • Wojciech LisikW Offline
    Wojciech LisikW Offline
    Wojciech Lisik
    wrote on last edited by Wojciech Lisik
    #17

    @julian and this is enough. Im done with any type of conversation with you.
    In addition to this :: I will not contribute any of my asset (time/code/whatever you think I have) to NodeBB.

    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development