FAQ  •  Register  •  Login

Unix Error Code 2 But Home Directory Exists

<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Wed Dec 26, 2018 12:36 am

Unix Error Code 2 But Home Directory Exists

When I start serviio.service and check status I'm seeing this error:
  Code:
Process: 3596 ExecStop=/opt/serviio/bin/serviio.sh -stop (code=exited, status=0/SUCCESS)
 Main PID: 3653 (java)
    Tasks: 99 (limit: 3973)
   CGroup: /system.slice/serviio.service
           └─3653 java --add-modules jdk.unsupported -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Djava.net.preferIPv4Stack=true -Djava.awt.headless=tru

Dec 26 00:26:16 carmona serviio.sh[3653]: Could not lock User prefs.  Unix error code 2.
Dec 26 00:26:16 carmona serviio.sh[3653]: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

Seems to be a problem with serviio user not having a home directory, or write access to it, but when I run this I get:
  Code:
sudo usermod -m -d /home/serviio serviio
usermod: no changes

And cat passwd gives me:
  Code:
serviio:x:999:999::/home/serviio:/bin/false

System info:
  Code:
[MediaServer] Serviio DLNA media streaming server v 1.10.1 (rev. 3e5b0ba57122)
2018-12-26 00:21:13,537 INFO  [MediaServer] Petr Nejedly 2009-2018
2018-12-26 00:21:13,537 INFO  [MediaServer] http://www.serviio.org
2018-12-26 00:21:13,537 INFO  [MediaServer]
2018-12-26 00:21:13,537 INFO  [MediaServer] Java 10.0.2-Oracle Corporation amd64
2018-12-26 00:21:13,537 INFO  [MediaServer] OS Linux 4.15.0-43-generic
2018-12-26 00:21:13,537 INFO  [MediaServer] File encoding: UTF-8
2018-12-26 00:21:13,538 INFO  [MediaServer] Headless mode enabled: true
2018-12-26 00:21:13,538 INFO  [MediaServer] User: serviio
2018-12-26 00:21:13,538 INFO  [MediaServer] User home dir: /home/serviio
2018-12-26 00:21:13,538 INFO  [MediaServer] Temp dir: /tmp
<<

freaknik

User avatar

DLNA master

Posts: 345

Joined: Thu Mar 27, 2014 2:05 pm

Location: Endor

Post Wed Dec 26, 2018 5:36 am

Re: Unix Error Code 2 But Home Directory Exists

look at permissions of the folder tree at the home directory.

cd ~
ls -lha

See what they look like.
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Wed Dec 26, 2018 5:36 pm

Re: Unix Error Code 2 But Home Directory Exists

I have to sudo su as the serviio user in order to view permissions right?
<<

freaknik

User avatar

DLNA master

Posts: 345

Joined: Thu Mar 27, 2014 2:05 pm

Location: Endor

Post Wed Dec 26, 2018 11:29 pm

Re: Unix Error Code 2 But Home Directory Exists

I don't think to read only to change.
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Thu Dec 27, 2018 4:41 am

Re: Unix Error Code 2 But Home Directory Exists

I'm not there is a way to view another users home file permission without being that user as ~ takes me to my home folder, not serviio users home folder. Also, su serviio is out because serviio user does not have a password.
<<

NuttBoxer

Serviio newbie

Posts: 17

Joined: Sun Sep 21, 2014 8:32 pm

Post Thu Dec 27, 2018 9:10 am

Re: Unix Error Code 2 But Home Directory Exists

So it appears my issue was that the home directory was not created for serviio user. I thought this wasn't necessary following the wiki for Ubuntu 15.04, but apparently it is. I thought passwd listed the actual home directory, not the declared one, which is wrong. Created the directory, and no longer seeing that error when I start Serviio.
<<

freaknik

User avatar

DLNA master

Posts: 345

Joined: Thu Mar 27, 2014 2:05 pm

Location: Endor

Post Thu Dec 27, 2018 2:59 pm

Re: Unix Error Code 2 But Home Directory Exists

Nice, glad you figured it out, thanks for posting solution! Maybe it will help someone else.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 51 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.