ubuntu 1810上snap安装nextcloud

2023-05-16

尝试在ubuntu1810上安装nextcloud。因为服务器配置好了xrdp远程访问,所以直接准备在sofware center进行安装

安装了半天却提示“unable to install nextcloud , snap xxxxx”,当时看着以为是缺少snap,百度了才发现,这是个安装管理器

ubuntu1810上自带了。就此,直接打开terminal,snap install nextcloud,然后发现居然要4h的下载,百度了下,好像国内没有好的snap源,就放置了一晚上。第二天一早,发现安装好了。

利用局域网直接浏览器登陆服务器IP,就可以发现进去了nextcloud。这个时候又想着配个公网ip映射,这样家里也可以登陆。

防火墙内部映射完公网IP之后,直接利用公网IP,提示:

当前域名无法登陆... 然后说啥 参考nextloud/config/config.sample.php,修改trusted_domains

然后又回到服务器,查找了snap,当时傻里傻气的,发现根目录下有个snap,直接进去,搜索到了config.sample.php

 

复制了里面的

 'trusted_domains' =>
  array (
    'demo.example.org',
    'otherdomain.example.org',
  ),

准备贴到config.php里面,再修改域名。

发现目录下的config.php,死活无法修改。

想想可能是没有关闭nextcloud,又在terminal,里面输入了 snap stop nextcloud,关闭了nextcloud,发现还是没有用

又想起chmod修改只读属性的时候,冒出了一句提示:

read-only file system

因此又,df -h,看看咋回事,发现如下诡异情况:

看这个,马上百度,百度的结果基本上教你怎么清理。。。

又打开bing,搜索了下:

https://askubuntu.com/questions/906581/what-is-dev-loopx

这里面也有问这个问题

That is normal. /dev/loopX are virtual devices to mount image files, these are -read only- so do not get larger or smaller than they are when created.

Those mount points are connected to the snapd service. You will see extra loop devices added for every software you install using "snap". It can be removed by uninstalling the app via snapd.

 

看到这个后,大概猜想了下,安装软件时,snap每个软件单独搞了这个虚拟空间,那肯定有个真正的地方,又找了下,发现在/var/snap/下其实才是真正配置的地方,下面这个回答更加详细:

https://askubuntu.com/questions/1035127/cannot-modify-files-installed-by-snap

Snap's program files are protected against change. This is done by the process of mounting the protected files in their specific space as read only.

The process also has specific space for configuration data which includes the user's specific home space (/home/user/snap) for data and configurations and a space for world-wide data (/var/snap).

All the world-wide snap files are readable and accessible via symbolic links to the /snap area.

You can verify the real location and how the spaces are linked with the following commands.

A command to see examples of snap's protected mounts:

$ mount | egrep snap | egrep ro,
/var/lib/snapd/snaps/core_4486.snap on /snap/core/4486 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/communitheme_185.snap on /snap/communitheme/185 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/hello-world_27.snap on /snap/hello-world/27 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/core_4407.snap on /snap/core/4407 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/communitheme_124.snap on /snap/communitheme/124 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_4571.snap on /snap/core/4571 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/communitheme_246.snap on /snap/communitheme/246 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/vlc_190.snap on /snap/vlc/190 type squashfs (ro,nodev,relatime,x-gdu.hide)

A command to see examples of snap's spaces that are not write protected:

$ mount | egrep snap | egrep -v ro,
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,noexec,relatime,size=3293156k,mode=755)
nsfs on /run/snapd/ns/hello-world.mnt type nsfs (rw)
nsfs on /run/snapd/ns/vlc.mnt type nsfs (rw)

By your error message you are trying to make change on files that have been programmably protected by the programmer. Your question suggests that you are the app's programmer. So you would have to use the features of snap's programming configuration to decide which files will be placed where.

How can I resolve this?

As I suggested in the comments, it would be safer and more common for you to design your program in a development environment as a normal user... normally in your own personal space, then use the snap's development system for installing the new version.

I'm not a snap programmer and can't give exact specifics of how the designing and export for use process works with snap. But I can imagine it might be similar to designing Android, or Java programs, where the developer will use some type of export or publish method to run or to test the new version in an installed configuration.

You could possibly experiment with remounting the protected read-only filesystems to read/write. I wouldn't advise it, because it might be possible to break the integrity of the snap system, or provide unexpected behavior where your application may not behave as intended because of the modification of the snap system itself.

 

最后找到了/var/snap/nextcloud/14827/nextcloud/config,

打开config.php,在最后粘贴:

 'trusted_domains' =>
  array (
      'xxx.xxx.xxx.xxx:port',
  ),

xxx为输入自己的映射的公网IP,如果不是默认80端口也要带上端口

完成之后,

snap start nextcloud,即可。

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ubuntu 1810上snap安装nextcloud 的相关文章

  • NMCLI 设备不可用

    我正在尝试在 ubuntu core 16 04 上配置带有蜂窝接口的新设备 我有 NMCLI 包在上面运行 在添加连接之前 我检查了接口 nmcli dev DEVICE TYPE STATE CONNECTION eth1 ethern
  • 给出 5 个参数,但在终端中只得到 3 个参数

    我想将一个文件传递给一个c 程序 如果我在 IDE 中执行此操作 test string string lt test txt return argc 5 但在终端上我刚刚得到argc 3 看来 这是因为 什么是 lt 意思是 我正在使用
  • Jenkins中找不到环境变量

    我想在詹金斯中设置很多变量 我试过把它们放进去 bashrc bash profile and profile of the jenkins用户 但 Jenkins 在构建发生时找不到它们 唯一有效的方法是将所有环境变量放入Jenkinsf
  • nslookup 报告“无法解析 '(null)': 名称无法解析”,尽管它成功解析了 DNS 名称

    我在 ubuntu 上 并且正在运行 docker 默认桥接网络 我有 Zookeeper kafka 的容器化版本 以及我编写的与 kafka 对话的应用程序 I do a docker exec it
  • 无法在 mysql-apt-config [Ubuntu 14.04] 中选择“确定”

    我使用的是 Ubuntu 14 04 sudo apt get update总是给我这个选项来配置 mysql apt config 我尝试选择版本 按 tab gt 在 确定 上突出显示的键 按 Enter 但没有任何反应 它再次返回并突
  • 让 Rails 生产在端口 80 上运行

    我正在尝试让我的 Rails 应用程序在生产模式下运行 但遇到了一些困难 我正在使用 Passenger 和 apache 并运行 Ubuntu 12 04 我已经配置和创建了生产数据库 并设置了乘客 状态如下 rvmsudo passen
  • PHP 无法打开流:是一个目录

    非常简单的 PHP 脚本 我在我亲自设置的 Ubuntu Web 服务器上的 EE 模板中运行 我知道这与权限有关 并且我已经将我尝试写入的目录的所有者更改为 Apache 用户 我得到的错误是 遇到 PHP 错误 严重性 警告 消息 fi
  • 在初始化脚本中切换用户?

    这是我的 Ubuntu 工作站上的初始化脚本 我需要以除 root 之外的其他用户身份运行命令 但我就是不知道应该如何完成它 两者都不sudo u or su newuser似乎有效 剧本 respawn console none star
  • Ubuntu 上的 Python 2.7

    我是 Python 新手 正在 Linux 机器 Ubuntu 10 10 上工作 它正在运行 python 2 6 但我想运行 2 7 因为它有我想使用的功能 有人敦促我不要安装 2 7 并将其设置为我的默认 python 我的问题是 如
  • git 错误:无法处理 https

    当我尝试使用 git clone 时https xxx https xxx我收到以下错误我不处理协议 https 有人可以帮我吗 完整消息 dementrock dementrock A8Se git 克隆https git innosta
  • 有人可以解释一下 Postgresql 角色、Postgresql 用户和 Linux 用户之间的关系吗?

    我正在尝试在 Ubuntu 14 服务器上设置 Postgres 9 3 此时我感到非常沮丧 我以前使用过 MySQL 所以我对一般数据库概念以及客户端 服务器模型等很满意 我从两个用户开始 root 和 sam 我 作为 sam 我使用
  • 如何重命名 .tar.gz 文件而不提取内容并在 UBUNTU 中创建新的 .tar.gz 文件?

    我有一个命令将创建一个新的 tar gz现有文件中的文件 sudo tar zcvf Existing tar gz New tar gz 该命令将创建一个新的New tar gz从现有的文件Existing tar gz file 谁能告
  • 在 Ubuntu 中与未编译的着色器链接

    我需要加载 glsl 来绘制一些东西 我的环境是Ubuntu 13 04 因此它不存在GLuint InitShader GLuint GLuint 这是我的对象创建 预链接步骤和链接的配置 不幸的是 它仍然出现错误 该错误与未编译的着色器
  • OpenSSL 未签名证书静默

    遇到了麻烦 还有其他一些相关的帖子 但没有那么具体 我正在尝试为开发机器默默地生成证书 这些是我最初运行的命令 但被要求输入密码 openssl genrsa des3 out server key 1024 openssl req new
  • 使用启用了两步身份验证的 python 脚本从 nextcloud 下载文件

    我设置了一个 nextcloud 实例 我想使用 python 脚本从那里下载文件 我的 nextcloud 实例对所有用户强制执行两步身份验证 我希望它保持这种状态 我梦想的场景是使用requests库 因此请按照此处的文档进行操作htt
  • BASH 中的空函数

    我正在使用 FPM 工具创建 deb 包 此工具在从支持的文件中删除包之前 之后创建 不幸的是FPM生成的bash脚本包含这样的函数 dummy 该脚本退出时出现错误 语法错误 意外 BASH 不允许空函数吗 哪个版本的 bash linu
  • 在 ubuntu 中找不到 .android 文件夹 [关闭]

    Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 我在哪里可以找到 android在 Ubuntu 中 我想使用debug keystore 转到您的主文件夹并按 ctrl h 瞧
  • 有没有办法在 TypeScript 2+ 中全局添加类型定义?

    我有一堆简单的 ts files 不是项目 即独立的 ts 脚本 他们使用一些 Node js 功能 TypeScript 和节点类型定义通过安装 npm install g typescript npm install g types n
  • PMA 4.5.2.0 file_exists():open_basedir 限制生效

    从 PPA 在我的 Ubuntu 服务器上安装 phpMyAdmin 后 https launchpad net nijel archive ubuntu phpmyadmin https launchpad net nijel archi
  • fgets() 和 Ctrl+D,三次才能结束?

    I don t understand why I need press Ctrl D for three times to send the EOF In addition if I press Enter then it only too

随机推荐

  • (C)数组,指针

    数组 xff1a int a 8 指针数组 xff0c 每个单元存放一个指针 每个指针是占8个字节在64位 xff0c 32位占4个字节 int xff08 a xff09 8 数组指针 xff0c 一个指向数组的指针 数组定义 xff1a
  • week5 单调栈 最大矩形

    Titile 给一个直方图 xff0c 求直方图中的最大矩形的面积 例如 xff0c 下面这个图片中直方图的高度从左到右分别是2 1 4 5 1 3 3 他们的宽都是1 xff0c 其中最大的矩形是阴影部分 Input 输入包含多组数据 每
  • ERROR 1238 (HY000): Variable ‘secure_file_priv‘ is a read only variable

    在进行数据导出操作的时候 xff0c 报错 xff1a ERROR 1238 HY000 Variable secure file priv is a read only variable 该变量是可读的 xff0c 不能用set设置 xf
  • kali安装目录扫描工具-dirsearch和git泄露利用脚本GitHack

    目录扫描工具 dirsearch 下载dirsearch git clone https github com maurosoria dirsearch 进入dirsearch目录 xff0c 进行扫描 这里我尝试了几次不同的用法 xff0
  • C语言—写一个函数求unsigned int型变量x在内存中二进制1的个数

    题目 xff1a 写一个函数求unsigned int型变量x在内存中二进制1的个数 思路 xff1a 先把num除2取余 xff0c 余数为1 xff0c count 43 43 再让num 61 num 2 取整 循环 xff0c 直到
  • Proteus 8.9下载安装指南

    因为Keil中的代码需要进行仿真 xff0c 除了用实际的开发板 xff0c 仿真软件也很实用 虽然已经装了AD xff0c 但是网上关于AD仿真的资料相对较少 今天装一个Proteus用用 安装包 xff1a Proteus8 9 提取码
  • STM32烧录

    资源包 xff1a STLink驱动 软件包 提取码 xff1a cgcg 结构 xff1a 通过RX TX脚连接到MCU芯片串口引脚 xff0c USB串口转换器 xff08 USB TTL的电路 xff09 一边连接RX TX引脚 xf
  • stm32使用串口进行通讯之发送数据

    前提准备 xff1a 1 库函数基础模板 2 stlink下载器 USB TTL下载器 单片机最小开发板stm32F103C8T6 3 面包板及相关接线 4 vscode与keil的联合开发更流畅 5 串口软件 xff0c 这个下面视频有
  • ubuntu 16.04挂载磁盘,开机丢失

    一般磁盘可能要先格式化为指定格式 sudo mkfs t ext4 dev sdb1 直接mount磁盘分区 xff0c 比如 sudo mount dev sdb1 var 当时起作用了 xff0c 但是reboot之后 xff0c 就会
  • stm32使用外部flash w25Q128实现读写操作

    前言 数据保存是所有项目的基本功能 xff0c 但是对于STM32C8T6的原flash进行操作 xff0c 一方面大小有可能不够 xff0c 另一方面单片机的运行程序本来就放在这个里面 xff0c 所以还是外接的好 这里选用w25Q128
  • Keil(MDK)STM32和51版本详细安装

    前言 保姆级教程 xff0c 多次反复安装 xff0c 实测可用 链接包失效可留言 安装注意 keil公司被ARM公司收购 xff0c 收购后就改名MDK xff0c 所以keil的下载包也是以MDK命名 安装路径不能带有中文 目录不能和5
  • STM32 使用LCD12864显示屏(串行方式)

    LCD12864 简介 12864LCD液晶显示模块是一款4位 8位并行 2线或3线接口方式 xff0c 内部含有国际一级 二级简体中文字库的图形点阵液晶模块 显示分辨率为12864 xff0c 内置8198个1616点汉字 xff0c 和
  • 快速学习C语言指针操作

    一 了解底层 指针说到底是在对数据进行操作 先了解数据的存储 xff0c 看看指针操作的位置 一位数据的存储 xff1a 将一位数据置1 xff0c 如图所示 xff0c 首先地址位需要置1 xff0c 再将数据输入位置1 xff0c 那么
  • MG90S 舵机180°角度驱动

    MG90S简介 舵机 xff1a 是一种角度伺服电机 xff0c 一般是由齿轮组 电位器 舵机控制电路 直流电机构成 由发送控制信号来控制输出轴的位置 数字舵机与模拟舵机的区别 xff1a MG90S是一款常用的数字舵机 xff0c 还有一
  • MPU6050 6轴姿态传感器的分析与使用(一)

    一 MPU6050简介 MPU6050是一个6轴姿态传感器 xff08 3轴加速度计和3轴陀螺仪传感器 xff09 xff0c 可以测量芯片自身X Y Z轴的加速度 角度参数 xff0c 通过数据融合 xff0c 可以得到姿态角 二 简介分
  • 基于51单片机的步进电机驱动,亲测无误

    文章目录 前言一 我们该如何实现电机驱动 xff1f 二 驱动实现1 硬件准备2 软件编写3 实物 总结 前言 这一次要分享的项目是最近接单做的一个小玩意儿 xff0c 基于51单片机的步进电机驱动 最近积压了两个月的小项目会在后面陆续发出
  • 对 string 类的输入(直接看总结)

    一 简述 cin get 和 cin getline 解决 char 中的问题 xff0c 遇到换行符时才停止 对于 string 类 xff0c 不能使用cin get 和cin getline 进行输入 xff0c 会报错 xff0c
  • C++中字符串的比较(针对C-风格字符串)

    一 简述 在头文件 lt cstring gt 中 xff0c 有一个函数strcmp 二 详细介绍 strcmp 比较字符串 格式为 strcmp const char Str1 const char Str2 xff0c 由此可见 xf
  • 关于文件结束符EOF

    一 简述 我们知道 xff0c C 43 43 中可以通过cin xff0c cin get xff0c cin getline xff0c getline 等对字符串进行输入 xff08 若对这些输入模糊 xff0c 可以阅读这篇文章 x
  • ubuntu 1810上snap安装nextcloud

    尝试在ubuntu1810上安装nextcloud 因为服务器配置好了xrdp远程访问 xff0c 所以直接准备在sofware center进行安装 安装了半天却提示 unable to install nextcloud snap xx