Jump to content

Help with setting permissions on raspberry pi


Go to solution Solved by Luke,

Recommended Posts

Posted

Hello all, 

I'm not a complete beginner, but I need some help with setting the permissions on my mount on raspbian. 

I have a USB hdd owned by root, but with 777 permissions. Emby server accesses it OK with the emby user. 

However, I keep getting lots of errors with the configuration backup plugin, although the files seem to still be copied. 

My logs get flooded with messages like this:

2021-01-27 00:10:30.941 Error Server Configuration Backup: Error Copying /var/lib/emby/root/default/Playlists/options.xml to /mnt/JP/emby/Emby Backup - 2021-01-27 00.10.30 - Auto/library/Playlists/options.xml
	*** Error Report ***
	Version: 4.5.4.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_armhf.deb
	Operating system: Linux version 5.4.83-v7+ (dom@buildbot) (gcc version 8.4.0 (Ubuntu/Linaro 8.4.0-3ubuntu1)) #1379 SMP Mon Dec 14 13:08:57 GMT 2020
	Framework: .NET Core 3.1.8
	OS/Process: arm/arm
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path is denied.
	 ---> System.IO.IOException: Operation not permitted
	   --- End of inner exception stack trace ---
	   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
	   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.CopyFile(String source, String target, Boolean overwrite)
	   at MBBackup.ServerEntryPoint.CopyFile(String source, String target, Boolean createDirectory)
	Source: System.IO.FileSystem
	TargetSite: Void CopyFile(System.String, System.String, Boolean)
	InnerException: System.IO.IOException: Operation not permitted
	Source: 
	TargetSite:
mastrmind11
Posted
5 hours ago, Pancake2 said:

/mnt/JP/emby/

emby needs to have write permission to this folder

Posted
2 minutes ago, mastrmind11 said:

emby needs to have write permission to this folder

I gave it 777 permission with chmod, shouldn't that work? 

mastrmind11
Posted

what is the output of ls -l on that directory?

Posted
1 hour ago, mastrmind11 said:

what is the output of ls -l on that directory?

pi@raspberrypi:/mnt/JP/emby $ ls -l
total 20
drwxrwxrwx 1 root root 4096 Jan 24 00:10 'Emby Backup - 2021-01-24 00.10.5 - Auto'
drwxrwxrwx 1 root root 4096 Jan 25 00:10 'Emby Backup - 2021-01-25 00.10.5 - Auto'
drwxrwxrwx 1 root root 4096 Jan 26 00:10 'Emby Backup - 2021-01-26 00.10.5 - Auto'
drwxrwxrwx 1 root root 4096 Jan 26 16:36 'Emby Backup - 2021-01-26 16.36.33 - Auto'
drwxrwxrwx 1 root root 4096 Jan 27 00:10 'Emby Backup - 2021-01-27 00.10.30 - Auto'

 

mastrmind11
Posted

well it's clearly writing the files, so it's not that directory.  how about the permissions on /opt/emby-server/system

Posted

Ok, I fixed it by editing the fstab file and setting emby as the owner.

After restart, I'm still getting one error when emby starts, is it related?

Quote

2021-01-27 15:08:09.895 Error Server: Error processing request
	*** Error Report ***
	Version: 4.5.4.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_armhf.deb
	Operating system: Linux version 5.4.83-v7+ (dom@buildbot) (gcc version 8.4.0 (Ubuntu/Linaro 8.4.0-3ubuntu1)) #1379 SMP Mon Dec 14 13:08:57 GMT 2020
	Framework: .NET Core 3.1.8
	OS/Process: arm/arm
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Emby.Server.Implementations.IO.SharpCifsFileSystem.IsEnabledForPath(String path)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Int32 bufferSize, FileOpenOptions fileOpenOptions)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions)
	   at MediaBrowser.Providers.Manager.ProviderManager.SaveImage(BaseItem item, String source, ReadOnlyMemory`1 mimeType, ImageType type, Nullable`1 imageIndex, Nullable`1 saveLocallyWithMedia, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.LibraryManager.GetLazyImage(String key, BaseItem item, ImageType type, Int32 imageIndex, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.LibraryManager.ConvertImageToLocal(BaseItem item, ItemImageInfo image, Int32 imageIndex, CancellationToken cancellationToken)
	   at Emby.Drawing.ImageProcessor.ProcessImage(ImageProcessingOptions options, CancellationToken cancellationToken)
	   at MediaBrowser.Api.Images.ImageService.GetImage(ImageRequest request, Int64 itemId, BaseItem item, Boolean isHeadRequest)
	   at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Boolean IsEnabledForPath(System.String)

 

Posted
3 hours ago, Pancake2 said:

Ok, I fixed it by editing the fstab file and setting emby as the owner.

After restart, I'm still getting one error when emby starts, is it related?

 

Please attach the complete log file. Also what problem are you having?

Posted
2 hours ago, Luke said:

Please attach the complete log file. Also what problem are you having?

Actually I'm not having any problems, I was just checking the logs and got curious with that error. 

  • Solution
Posted

Ok it's nothing to worry about. We'll clean up that logging. Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...