pkolaczk / fclones

Efficient Duplicate File Finder
MIT License
1.94k stars 75 forks source link

/var/lib/snapd/void: Permission denied #260

Closed HansAndreManfredson closed 6 months ago

HansAndreManfredson commented 6 months ago

The problem is that the path I used for the search is mounted under /nfs. Based on the "Filesystem Hierarchy Standard" it is a violation against the standard, so the snaps are not able to access these parts. So it's a OSI Layer 8 Problem ;-)

Snap sandboxing utilizes technologies such as AppArmor, Seccomp, and Cgroups to isolate the applications. Restricting access to directories directly under / (the root of the filesystem) is a security measure designed to minimize potential risks.

If a snap could access directories directly under /, there would be a risk of the snap application inadvertently or intentionally modifying or deleting system files, leading to system instability. By restricting access to directories within the specific snap sandboxing directory (typically under /var/lib/snapd/snap), such potentially dangerous actions can be avoided.

This security principle aims to ensure the integrity of the system and ensure that snap applications run in an isolated environment without jeopardizing the entire system.


Hi,

has anybody else this problem:

[2024-03-27 07:39:17.951] fclones: warn: Failed to read dir /var/lib/snapd/void: Permission denied (os error 13)

I installed the application with snap...

OS:

cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Snap info:

snap info fclones
name:      fclones
summary:   Efficient duplicate file finder and remover
publisher: Piotr Kołaczkowski (pkolaczk-u)
store-url: https://snapcraft.io/fclones
contact:    pkolaczk@gmail.com
license:   unset
description: |
  Finds duplicate, unique, under- or over-replicated files and offers many ways to get rid of them
commands:
  - fclones
snap-id:      dWRwBrMdt6rMXf8VQNIN4tUq8MIP6k0s
tracking:     latest/stable
refresh-date: today at 07:31 UTC
channels:
  latest/stable:    v0.34.0 2023-11-01 (26) 2MB -
  latest/candidate: ↑
  latest/beta:      ↑
  latest/edge:      ↑
installed:          v0.34.0            (26) 2MB -

Error message:

fclones group .
[2024-03-27 07:39:17.951] fclones:  info: Started grouping
[2024-03-27 07:39:17.951] fclones: warn: Failed to read dir /var/lib/snapd/void: Permission denied (os error 13)
[2024-03-27 07:39:17.951] fclones:  info: Scanned 1 file entries
[2024-03-27 07:39:17.952] fclones:  info: Found 0 (0 B) files matching selection criteria
[2024-03-27 07:39:17.952] fclones:  info: Found 0 (0 B) candidates after grouping by size
[2024-03-27 07:39:17.952] fclones:  info: Found 0 (0 B) candidates after grouping by paths
[2024-03-27 07:39:17.952] fclones:  info: Found 0 (0 B) candidates after grouping by prefix
[2024-03-27 07:39:17.952] fclones:  info: Found 0 (0 B) candidates after grouping by suffix
[2024-03-27 07:39:17.952] fclones:  info: Found 0 (0 B) redundant files
# Report by fclones 0.34.0
# Timestamp: 2024-03-27 07:39:17.952 +0000
# Command: /snap/fclones/26/bin/fclones group .
# Base dir: /var/lib/snapd/void
# Total: 0 B (0 B) in 0 files in 0 groups
# Redundant: 0 B (0 B) in 0 files
# Missing: 0 B (0 B) in 0 files
HansAndreManfredson commented 6 months ago

Short advise: Install fclones from deb-package... So you don't run in that problem. ;-)