#914 server can not start due to wrong folder permission

Reporter social loser
Owner Zash
Created
Updated
Stars ★ (1)  
Tags
  • Status-New
  • Priority-Medium
  • Type-Defect
  1. social loser on

    What steps will reproduce the problem? 1.install prosody on archlinux 2.run command 'prosodyctl adduser test@local' What is the expected output? What do you see instead? the error message is : datamanager error Unable to write to accounts storage ('/var/lib/prosody/local/accounts/test.dat~: Permission denied') for user: test@local Error saving to storage What version of the product are you using? On what operating system? product: prosody1.0.10.r7198 OS: archlinux Please provide any additional information below. change the permission of folder /var/lib/prosody to 777 will solve the problem.but this is surely not a secure way.

  2. social loser on

    with some further experiment , I add more info here , to make things simpler. say, my current login user is 'tom', there are several problems, all with the permission of '/var/lib/prosody/' folder: 1, a clear installation will create this folder with ownership of root, and permission 750 at this time , running 'prosodyctl adduser' will fail. the reason cause this is this command is running as user 'tom', it tries to create file owned by 'tom' and it fails. 2, if change permission to 777, then user can be added , but the user file created is not readable by the server daemon, so even you add the user successfully , you still can't log in. 3, you have to manually change the permission of user data files created by 'prosodyctl adduser' command to be readable by others. at this time, it works. but further 'adduser' command still create wrong permission(or ownership).

  3. social loser on

    at step 1, if you run 'prosodyctl adduser' with root, the created file is not readable by the server process.

  4. Zash on

    This sounds like a packaging issue, please report it to whoever made the package you installed. Normally during installation you should create a dedicated account for Prosody, usually 'prosody'. It sounds like this hasn't been done. https://prosody.im/doc/packagers#prosody_user_account

    Changes
    • owner Zash

New comment