我正在尝试设置 FTP 服务器,并且一直在遵循指南。它们都只显示如何设置一个用户,我需要让多个用户能够访问同一个文件夹并从中提取文件。我是否可以设置一个文件夹并将多个用户限制在该文件夹中?
我使用的是 vsftpd。用户将独立并需要能够从文件夹中下载文件,但不能向该文件夹写入任何内容或离开该文件夹。
我一直遵循这些指南:
https://documentation.ubuntu.com/server/how-to/networking/ftp/index.html
我正在尝试设置 FTP 服务器,并且一直在遵循指南。它们都只显示如何设置一个用户,我需要让多个用户能够访问同一个文件夹并从中提取文件。我是否可以设置一个文件夹并将多个用户限制在该文件夹中?
我使用的是 vsftpd。用户将独立并需要能够从文件夹中下载文件,但不能向该文件夹写入任何内容或离开该文件夹。
我一直遵循这些指南:
https://documentation.ubuntu.com/server/how-to/networking/ftp/index.html
我已经努力了两天,想让 Ubuntu Server 24 LTS 在 Raspberry Pi 5 (8Gb) 上运行。情况如下:我想用 OpenVPN 创建一个 VPN 服务器(它与相关系统完全兼容)。要工作,需要 Ubuntu 的 LTS 服务器版本(https://openvpn.net/as-docs/raspberry-pi.html)。我想到了一个带有触摸显示屏的小型独立站,为此我购买了一个展示柜和官方显示屏。一切组装好后,我在 SD 卡上安装了桌面版(使用 RPI 成像仪 - 官方工具),结果得到了错误版本的操作系统,我在启动时注意到了这一点,但没什么大不了的,显示屏打开了,触摸工作正常。我总是用同样的工具在 SD 卡上安装了服务器版本,但显示屏没有启动,我连接了一个 hdmi 显示器,我认为安装一个 GUI 和一些设置就足够了,然而,磨难开始了。sudo apt update && sudo apt upgrade
使用命令 apt install ubuntu-desktop 我下载了所有软件包并安装,当我重新启动显示器时,所有内容都停止在屏幕上,左上角的光标闪烁...... Ctrl + Alt + F2 然后我回到控制台,我尝试命令 startx 和 xinit 放弃,无法连接到 x,服务器错误。
我再次准备了 SD 并尝试使用 xubuntu-desktop,结果还是一样。我再次准备了 SD 并重新安装了完整的桌面,然后尝试修改配置文件,因为我在网上唯一一篇试图解决类似问题的帖子中找到了解决方法:
粘贴“display_auto_detect=1”并注释掉 /boot/firmware/config.txt 中的“dtoverlay=vc4-kms-v3d”行,以启用 ubuntu 上的触摸屏“display_auto_detect=1”我已经在配置中了,我只在“注释”dtoverlay=vc4-kms-v3d 中添加了 #,它也已经存在。结果什么也没做。
桌面无法通过 HDMI 启动,触摸显示屏无法打开。用于连接主板的指南:https://www.raspberrypi.com/documentation/accessories/display.html
我尝试再次安装桌面版,触摸显示屏再次启动(似乎需要以某种方式重新校准),我借此机会比较了两个配置文件(带显示屏的桌面和服务器)。我将它们粘贴在这里,只有一个区别。
(链接已损坏,已被管理员删除)
两个配置文件之间的差异似乎与此无关,它应该只是启用了调试端口。这是我给出 startx 命令时发生的情况: https://ibb.co/5hY9YS8P
出现错误后我打开了 x 日志文件:
你认为它是什么?
我希望“ --genkey --tls-crypt
”将在“ /tmp/test.key
”中生成一个密钥,但它不会将结果写入目标文件,而只会将结果打印到控制台。
以下是用于测试的“ --genkey --tls-crypt
”和“ cat
”:
# openvpn --genkey --tls-crypt /tmp/test.key
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
65bc8c4654ddd1e39c7b2fb1c5d7b6c7
b551e4f48a109efb3f142b442eb7c808
3428ffc3a41a4fa52464cc8556469c5f
69d0736db7f37c56788da8f3995399c9
8bd664f9e669683805591a9a8fa1b73e
42058e66695f6b735fc4a52dbf26b1db
386811f79c629864c7b7169625e8d75a
30be70f1578eaa1340828de4eb9e2b4f
68f5f276e451429fd706e54f08bc08d2
538c0c66590fb6b5204b9b6f78634f52
dac5be0c419996cccc2bc9add38b0e33
4891a1f11b772ec3a13aed5f0ba678d0
e7f3497b39c549c8cfddbf28205bf24f
a23c07b58109d8f0efe868e35be8b3da
c4f7073dc4031d7d600790c4370189b4
57d8453ed1f565764ef69aeea4f85039
-----END OpenVPN Static key V1-----
# cat /tmp/test.key
cat: /tmp/test.key: No such file or directory
#
如何在 OpenVPN 中用“ /tmp/test.key
”生成密钥“ --genkey --tls-crypt
”?在 OpenVPN 中“ ”的正确使用方法是什么--genkey --tls-crypt
?
我在 ubuntu 服务器上设置了一个 openvpn 客户端,我希望即使连接失败也能始终保持界面打开。我已persist-tun
在 .conf 文件中尝试过此操作:
但是,如果我运行,那么界面就不会再显示?sudo systemctl stop [email protected]
ifconfig
这个问题已被问过很多次,但很多帖子已经有好几年了,但我们无法弄清楚其中哪一个有效。
我们有一个通过 systemd 启动的服务,它以单独的用户身份运行,我们将其称为“myservice”。该服务的文件夹结构位于 /opt/company/product/{bin,log,etc}。该进程配置为使用大量线程,因为它将文件从一个服务器传输到另一个服务器。有时我们会因为打开的文件过多而收到错误。
我们尝试设置 ulimit,sysctl -w fs.file-max=1000000,在文件中进行配置,但似乎没有任何效果。
Ubuntu 24.04 目前如何将特定进程或用户的限制永久更改为非常高的数字,或者更好的是,完全禁用该限制?
谢谢
我正在尝试通过 ssh 连接到本地环境中的 raspberry pi 3 上的 ubuntu 服务器 22.04。起初我只是使用了命令,但出现了错误!所以我修改了文件并取消注释了和行。再次尝试后,我收到了错误(我被告知这是在您输入错误密码时显示的,但我输入了正确的密码)。有趣的是,我能够从 ubuntu 服务器通过 ssh 连接到 myPC,但反之则不行。我终于能够使用 puclickey 进行 ssh,但对于我和我的同事来说,使用密码验证连接到 raspberry pi 要容易得多,特别是因为它在本地网络环境中。ssh [email protected]
premission denied (publickey)
sshd_config
PasswordAuthentication yes
PublickeyAuthentication no
premission denied()
有人知道如何使用密码进行 ssh 吗?
编辑:这是 ssh -vvv 命令输出的重要部分
amir@amirux:~$ ssh -vvvv [email protected]
OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.179.15 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/amir/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/amir/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.179.15 [192.168.179.15] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: Connection established.
.
.
.
debug1: Next authentication method: password
[email protected]'s password:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue:
Permission denied, please try again.
看来我输入了错误的密码,但我 100% 确定它是正确的。正如有人在评论部分提到的那样,cloud init 似乎安装在 RPi 上,这可以阻止密码验证吗?
我找不到我的问题的好答案,作为开发人员和系统管理员,我是否需要安装 ffmpeg、faac、alac、wavpack、vorbis、lame、imagemagick 和其他多媒体编解码器来运行和播放音乐,或者在网络开发中为音乐制作广播流,或者处理像 imagemagick 这样的图像。
那么什么时候需要安装多媒体编解码器,什么时候不需要它们?
我的客户有一台 Ubuntu 服务器“22.04.4 LTS (GNU/Linux 6.5.0-1022-azure x86_64)”,运行带有 mod-perl 的 Apache。安装的 Perl 版本是 5.34。最近,企业主要求我将 Perl 更新到 5.40,因为 5.34 中发现了一些漏洞。不幸的是,我是一名开发人员,只能在 Ubuntu 上执行最简单的管理操作,所以这对我来说是全新的事情。我从“sudo apt update”开始,然后是“apt-list--upgradable”。有一些软件包,但只有“libdpkg-perl”似乎与 Perl 有关。根据其描述,这不是我要找的。我找到了安装在该机器上的模块列表。其中一些看起来与网站相关:
所有这些模块均未列为有升级。那么,如何升级 Perl?不更新整个系统是否可行?提前谢谢!
我的虚拟机(VirtualBox 虚拟机)位于 /media/hostname/UUID 上。每次重新启动时都会挂载此驱动器,但我的虚拟机无法访问。在 GUI 中必须访问几次驱动器...进入其上的 VM 目录,在很短的时间内 VM 就会恢复运行。从终端看,它看起来像这样:“inaccesible”{xxxxxxxxx-3e7a-4c0c-a17c-xxxxxxxxxxxx}“nexxxxxx”{xxxxxxxxx-f48d-4776-bee3-xxxxxxxxxxxx} ... 一段时间后,在 GUI 上访问所有文件夹,如上所述:“hcxxxxxx”{xxxxxxxxx-3e7a-4c0c-a17c-xxxxxxxxxxxx}“nexxxxxx”{xxxxxxxxx-f48d-4776-bee3-xxxxxxxxxxxx} 已访问所有文件夹、驱动器,并向所有用户授予所有权限...没有运气。如何修复它? ...或者在服务器重启后绕过它来运行 VM?...从终端?
我正在研究如何在 Ubuntu 22.04 中同步时间。与任何 systemd 控制的系统一样,该服务正在使用systemd-timesyncd
。
根据文档,启动时,systemd-timesyncd 将从以下位置读取配置文件/etc/systemd/timesyncd.conf
不可能,/etc/systemd/timesyncd.conf
因为其中的所有值都被注释掉了:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the timesyncd.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# See timesyncd.conf(5) for details.
[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
所有内容都注释掉了,但当我查询 timedatectl 时,我可以看到 npt 等的值。老天爷,我真不明白 timesync 是如何获得它的值的。
># timedatectl show-timesync
FallbackNTPServers=ntp.ubuntu.com
ServerName=ntp.ubuntu.com
ServerAddress=185.125.190.56
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=32s
NTPMessage={ Leap=0, Version=4, Mode=4, Stratum=2, Precision=-25, RootDelay=1.129ms, RootDispersion=213us, Reference=11FD1CFD, OriginateTimestamp=Fri 2024-11-29 21:22:30 GMT, ReceiveTimestamp=Fri 2024-11-29 21:22:33 GMT, TransmitTimestamp=Fri 2024-11-29 21:22:33 GMT, DestinationTimestamp=Fri 2024-11-29 21:22:30 GMT, Ignored=no PacketCount=656, Jitter=252.712ms }
据我所知,提到的其余 conf 文件均不存在。在我发疯之前,有什么想法吗?