https://wiki.archlinux.org/api.php?action=feedcontributions&user=RevolverXD&feedformat=atomArchWiki - User contributions [en]2024-03-29T00:54:18ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=NetworkManager&diff=501515NetworkManager2017-12-09T18:12:31Z<p>RevolverXD: added how to actually add new PPPoE connection using NetworkManager as it is not trivial and not accesiable through gnome settings.</p>
<hr />
<div>[[Category:Network configuration]]<br />
[[cs:NetworkManager]]<br />
[[de:Networkmanager]]<br />
[[es:NetworkManager]]<br />
[[fr:NetworkManager]]<br />
[[it:NetworkManager]]<br />
[[ja:NetworkManager]]<br />
[[pt:NetworkManager]]<br />
[[ru:NetworkManager]]<br />
[[tr:NetworkManager]]<br />
[[zh-hans:NetworkManager]]<br />
{{Related articles start}}<br />
{{Related|Network configuration}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|:Category:Network configuration}}<br />
{{Related articles end}}<br />
[http://projects.gnome.org/NetworkManager/ NetworkManager] is a program for providing detection and configuration for systems to automatically connect to network. NetworkManager's functionality can be useful for both wireless and wired networks. For wireless networks, NetworkManager prefers known wireless networks and has the ability to switch to the most reliable network. NetworkManager-aware applications can switch from online and offline mode. NetworkManager also prefers wired connections over wireless ones, has support for modem connections and certain types of VPN. NetworkManager was originally developed by Red Hat and now is hosted by the [[GNOME]] project.<br />
<br />
{{Warning|By default, Wi-Fi passwords are stored in clear text. See section [[#Encrypted Wi-Fi passwords]]}}<br />
<br />
== Installation ==<br />
<br />
NetworkManager can be [[install]]ed with the package {{Pkg|networkmanager}}. The package does not include the tray applet ''nm-applet'' which is part of the {{Pkg|network-manager-applet}}. It has functionality for basic DHCP support. For full featured DHCP and if you require IPv6 support, {{Pkg|dhclient}} integrates it. <br />
<br />
{{Note|You must ensure that no other service that wants to configure the network is running; in fact, multiple networking services will conflict. You can find a list of the currently running services with {{ic|1=systemctl --type=service}} and then [[stop]] them. See [[#Configuration]] to enable the NetworkManager service.}}<br />
<br />
=== VPN support ===<br />
<br />
NetworkManager VPN support is based on a plug-in system. If you need VPN support via NetworkManager, you have to install one of the following packages:<br />
<br />
* {{App|NetworkManager-openconnect|Connect to Cisco AnyConnect, Juniper VPNs.|https://git.gnome.org/browse/network-manager-openconnect|{{Pkg|networkmanager-openconnect}}}}<br />
* {{App|NetworkManager-openvpn|Connect to OpenVPN VPNs.|https://git.gnome.org/browse/network-manager-openvpn|{{Pkg|networkmanager-openvpn}}}}<br />
* {{App|NetworkManager-pptp|Connect to PPTP VPNs, Microsoft compatible.|https://git.gnome.org/browse/network-manager-pptp|{{Pkg|networkmanager-pptp}}}}<br />
* {{App|NetworkManager-vpnc|Connect to IPsec VPNs, Cisco compatible.|https://git.gnome.org/browse/network-manager-vpnc|{{Pkg|networkmanager-vpnc}}}}<br />
* {{App|NetworkManager-strongswan|Connect to IKEv2 IPsec VPNs with support for EAP, PSK and certificate authentication.|https://wiki.strongswan.org/projects/strongswan/wiki/NetworkManager|{{Pkg|networkmanager-strongswan}}}}<br />
* {{App|NetworkManager-fortisslvpn|Connect to Fortinet SSLVPN VPNs.|https://git.gnome.org/browse/network-manager-fortisslvpn|{{AUR|networkmanager-fortisslvpn-git}}}}<br />
* {{App|NetworkManager-iodine|Tunnel IP traffic via DNS using Iodine.|https://honk.sigxcpu.org/piki/projects/network-manager-iodine/|{{AUR|networkmanager-iodine-git}}}}<br />
* {{App|NetworkManager-libreswan|Connect to IPsec IKEv1 VPNs, Cisco compatible.|https://git.gnome.org/browse/network-manager-libreswan|{{AUR|networkmanager-libreswan}}}}<br />
* {{App|NetworkManager-l2tp|L2TP compatible VPN plugin .|https://github.com/nm-l2tp/network-manager-l2tp|{{AUR|networkmanager-l2tp}}}}<br />
* {{App|NetworkManager-ssh|Connect using OpenSSH's Tunnel capability.|https://github.com/danfruehauf/NetworkManager-ssh|{{AUR|networkmanager-ssh-git}}}}<br />
* {{App|NetworkManager-sstp|SSTP compatible VPN plugin.|http://sstp-client.sourceforge.net/#Network_Manager_Plugin|{{AUR|networkmanager-sstp}}}}<br />
<br />
{{Warning|1=VPN support is [https://bugzilla.gnome.org/buglist.cgi?quicksearch=networkmanager%20vpn unstable], check the daemon processes options set via the GUI correctly and double-check with each package release.[https://bugzilla.gnome.org/show_bug.cgi?id=755350]}}<br />
<br />
=== PPPoE / DSL support ===<br />
<br />
[[Install]] {{pkg|rp-pppoe}} for PPPoE / DSL connection support.<br />
To actually add pppoe connection you must use {{ic|1=nm-connection-editor}} from the command line and add new DSL/PPPoE connection.<br />
<br />
== Front-ends ==<br />
<br />
To configure and have easy access to NetworkManager, most users will want to install an applet. This GUI front-end usually resides in the system tray (or notification area) and allows network selection and configuration of NetworkManager. Various desktop environments have their own applet. Otherwise you can use [[#nm-applet]].<br />
<br />
=== GNOME ===<br />
<br />
[[GNOME]] has a built-in tool, accessible from the Network settings.<br />
<br />
=== KDE Plasma ===<br />
<br />
[[Install]] the {{Pkg|plasma-nm}} package.<br />
<br />
=== nm-applet ===<br />
<br />
{{Pkg|network-manager-applet}} is a GTK+ 3 front-end which works under Xorg environments with a systray.<br />
<br />
To store connection secrets install and configure [[GNOME/Keyring]].<br />
<br />
Be aware that after enabling the tick-box option {{ic|Make available to other users}} for a connection, NetworkManager stores the password in plain-text, though the respective file is accessible only to root (or other users via {{ic|nm-applet}}). See [[#Encrypted Wi-Fi passwords]].<br />
<br />
In order to run {{ic|nm-applet}} without a systray, you can use {{Pkg|trayer}} or {{Pkg|stalonetray}}. For example, you can add a script like this one in your path:<br />
<br />
{{hc|nmgui|<nowiki><br />
#!/bin/sh<br />
nm-applet 2>&1 > /dev/null &<br />
stalonetray 2>&1 > /dev/null<br />
killall nm-applet<br />
</nowiki>}}<br />
<br />
When you close the ''stalonetray'' window, it closes {{ic|nm-applet}} too, so no extra memory is used once you are done with network settings.<br />
<br />
The applet can show notifications for events such as connecting to or disconnecting from a WiFi network. For these notifications to display, ensure that you have a notification server installed - see [[Desktop notifications]]. If you use the applet without a notification server, you might see some messages in stdout/stderr, and the app might hang. See [https://bugzilla.gnome.org/show_bug.cgi?id=788313].<br />
<br />
In order to run {{ic|nm-applet}} with such notifications disabled, start the applet with the following command:<br />
$ nm-applet --no-agent<br />
<br />
{{Tip|{{ic|nm-applet}} might be started automatically with a [[Desktop_entries#Autostart|autostart desktop file]], to add the --no-agent option modify the Exec line there, i.e.<br />
<nowiki>Exec=nm-applet --no-agent</nowiki><br />
}}<br />
<br />
==== Appindicator ====<br />
<br />
Appindicator support is available in ''nm-applet'' however it is not compiled into the official package, see {{Bug|51740}}. To use nm-applet in an Appindicator environment, replace {{Pkg|network-manager-applet}} with {{AUR|network-manager-applet-indicator}} and then start the applet with the following command:<br />
$ nm-applet --indicator<br />
<br />
=== Command line ===<br />
<br />
The following applications can be useful for configuring and managing networks without X.<br />
<br />
==== nmcli ====<br />
<br />
A command line frontend, ''nmcli'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{man|1|nmcli}}. Examples:<br />
<br />
* To connect to a wifi network: {{bc|nmcli dev wifi connect <SSID> password <password>}}<br />
* To connect to a hidden network: {{bc|nmcli dev wifi connect <SSID> password <password> hidden yes}}<br />
* To connect to a wifi on the {{ic|wlan1}} wifi interface: {{bc|nmcli dev wifi connect <SSID> password <password> iface wlan1 [profile name]}}<br />
* To disconnect an interface: {{bc|nmcli dev disconnect iface eth0}}<br />
* To reconnect an interface marked as disconnected: {{bc|nmcli con up uuid <uuid>}}<br />
* To get a list of UUIDs: {{bc|nmcli con show}}<br />
* To see a list of network devices and their state: {{bc|nmcli dev}}<br />
* To turn off wifi: {{bc|nmcli r wifi off}}<br />
<br />
==== nmtui ====<br />
<br />
A curses based graphical frontend, ''nmtui'', is included with {{Pkg|networkmanager}}.<br />
<br />
For usage information, see {{man|1|nmtui}}.<br />
<br />
==== nmcli-dmenu ====<br />
<br />
Alternatively there is {{AUR|networkmanager-dmenu-git}} which is a small script to manage NetworkManager connections with ''dmenu'' instead of {{ic|nm-applet}}. It provides all essential features such as connect to existing NetworkManager wifi or wired connections, connect to new wifi connections, requests passphrase if required, connect to existing VPN connections, enable/disable networking, launch ''nm-connection-editor'' GUI.<br />
<br />
== Configuration ==<br />
<br />
NetworkManager will require some additional steps to be able run properly. Make sure you have configured {{ic|/etc/hosts}} as described in [[Network configuration#Set the hostname]] section.<br />
<br />
=== Enable NetworkManager ===<br />
<br />
NetworkManager is [[systemd#Using units|controlled]] with the {{ic|NetworkManager.service}} [[systemd]] unit. Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need ''nmcli'' or an applet to configure and connect.<br />
<br />
NetworkManager has a global configuration file at {{ic|/etc/NetworkManager/NetworkManager.conf}}. Usually no configuration needs to be done to the global defaults.<br />
<br />
=== Enable NetworkManager Wait Online ===<br />
<br />
If you have services which fail if they are started before the network is up, you may use {{ic|NetworkManager-wait-online.service}} in addition to {{ic|NetworkManager.service}}. This is, however, rarely necessary because most networked daemons start up okay, even if the network has not been configured yet.<br />
<br />
In some cases, the service will still fail to start successfully on boot due to the timeout setting in {{ic|/usr/lib/systemd/system/NetworkManager-wait-online.service}} being too short. Change the default timeout from 30 to a higher value.<br />
<br />
=== Set up PolicyKit permissions ===<br />
<br />
See [[General troubleshooting#Session permissions]] for setting up a working session.<br />
<br />
With a working session, you have several options for granting the necessary privileges to NetworkManager:<br />
<br />
* ''Option 1.'' Run a [[Polkit]] authentication agent when you log in, such as {{ic|/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1}} (part of {{Pkg|polkit-gnome}}). You will be prompted for your password whenever you add or remove a network connection.<br />
* ''Option 2.'' [[Users and groups#Group management|Add]] yourself to the {{ic|wheel}} group. You will not have to enter your password, but your user account may be granted other permissions as well, such as the ability to use [[sudo]] without entering the root password.<br />
* ''Option 3.'' [[Users and groups#Group management|Add]] yourself to the {{ic|network}} group and create the following file:<br />
<br />
{{hc|/etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules|<nowiki><br />
polkit.addRule(function(action, subject) {<br />
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {<br />
return polkit.Result.YES;<br />
}<br />
});<br />
</nowiki>}}<br />
<br />
: All users in the {{ic|network}} group will be able to add and remove networks without a password. This will not work under [[systemd]] if you do not have an active session with ''systemd-logind''.<br />
<br />
=== Network services with NetworkManager dispatcher ===<br />
<br />
There are quite a few network services that you will not want running until NetworkManager brings up an interface. Good examples are [[NTPd]] and network filesystem mounts of various types (e.g. '''netfs'''). NetworkManager has the ability to start these services when you connect to a network and stop them when you disconnect. To activate the feature you need to [[start]] the {{ic|NetworkManager-dispatcher.service}}.<br />
<br />
Once the feature is active, scripts can be added to the {{ic|/etc/NetworkManager/dispatcher.d}} directory. These scripts must be '''owned by root''', otherwise the dispatcher will not execute them. For added security, set group ownership to root as well:<br />
<br />
# chown root:root ''scriptname''<br />
<br />
Also, the script must have '''write permission for owner only''', otherwise the dispatcher will not execute them:<br />
<br />
# chmod 755 ''scriptname''<br />
<br />
The scripts will be run in alphabetical order at connection time, and in reverse alphabetical order at disconnect time. They receive two arguments: the name of the interface (e.g. {{ic|eth0}}) and the status (''up'' or ''down'' for interfaces and ''vpn-up'' or ''vpn-down'' for vpn connections). To ensure what order they come up in, it is common to use numerical characters prior to the name of the script (e.g. {{ic|10_portmap}} or {{ic|30_netfs}} (which ensures that the ''portmapper'' is up before NFS mounts are attempted).<br />
<br />
{{Warning|If you connect to foreign or public networks, be aware of what services you are starting and what servers you expect to be available for them to connect to. You could make a security hole by starting the wrong services while connected to a public network}}<br />
<br />
==== Avoiding the dispatcher timeout ====<br />
<br />
If the above is working, then this section is not relevant. However, there is a general problem related to running dispatcher scripts which take longer to be executed. Initially an internal timeout of three seconds only was used. If the called script did not complete in time, it was killed. Later the timeout was extended to about 20 seconds (see the [https://bugzilla.redhat.com/show_bug.cgi?id=982734 Bugtracker] for more information). If the timeout still creates the problem, a work around may be to modify the dispatcher service file {{ic|/usr/lib/systemd/system/NetworkManager-dispatcher.service}} to remain active after exit: <br />
<br />
{{hc|/etc/systemd/system/NetworkManager-dispatcher.service|2=<br />
.include /usr/lib/systemd/system/NetworkManager-dispatcher.service<br />
[Service]<br />
RemainAfterExit=yes}}<br />
<br />
Now start and enable the modified {{ic|NetworkManager-dispatcher}} service.<br />
<br />
{{Warning|Adding the {{ic|RemainAfterExit}} line to it will prevent the dispatcher from closing. Unfortunately, the dispatcher '''has''' to close before it can run your scripts again. With it the dispatcher will not time out but it also will not close, which means that the scripts will only run once per boot. Therefore, do not add the line unless the timeout is definitely causing a problem.}}<br />
<br />
==== Start OpenNTPD ====<br />
<br />
Install the {{Pkg|networkmanager-dispatcher-openntpd}} package.<br />
<br />
==== Mount remote folder with sshfs ====<br />
<br />
As the script is run in a very restrictive environment, you have to export {{ic|SSH_AUTH_SOCK}} in order to connect to your SSH agent. There are different ways to accomplish this, see [https://bbs.archlinux.org/viewtopic.php?pid=1042030#p1042030 this message] for more information. The example below works with [[GNOME Keyring]], and will ask you for the password if not unlocked already. In case NetworkManager connects automatically on login, it is likely ''gnome-keyring'' has not yet started and the export will fail (hence the sleep). The {{ic|UUID}} to match can be found with the command {{ic|nmcli con status}} or {{ic|nmcli con list}}. <br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
USER='username'<br />
REMOTE='user@host:/remote/path'<br />
LOCAL='/local/path'<br />
<br />
interface=$1 status=$2<br />
if [ "$CONNECTION_UUID" = "</nowiki>''uuid''<nowiki>" ]; then<br />
case $status in<br />
up)<br />
export SSH_AUTH_SOCK=$(find /tmp -maxdepth 1 -type s -user "$USER" -name 'ssh')<br />
su "$USER" -c "sshfs $REMOTE $LOCAL"<br />
;;<br />
down)<br />
fusermount -u "$LOCAL"<br />
;;<br />
esac<br />
fi<br />
</nowiki>}}<br />
<br />
==== Use dispatcher to automatically toggle Wi-Fi depending on LAN cable being plugged in ====<br />
<br />
The idea is to only turn Wi-Fi on when the LAN cable is unplugged (for example when detaching from a laptop dock), and for Wi-Fi to be automatically disabled, once a LAN cable is plugged in again. <br />
<br />
Create the following dispatcher script ([http://superuser.com/questions/233448/disable-wlan-if-wired-cable-network-is-available Source]), replacing {{ic|1=LAN_interface}} with yours.<br />
{{hc|/etc/NetworkManager/dispatcher.d/wlan_auto_toggle.sh|<nowiki><br />
#!/bin/sh<br />
<br />
if [ "$1" = "LAN_interface" ]; then<br />
case "$2" in<br />
up)<br />
nmcli radio wifi off<br />
;;<br />
down)<br />
nmcli radio wifi on<br />
;;<br />
esac<br />
fi<br />
</nowiki>}}<br />
{{Note|You can get a list of interfaces using [[#nmcli|nmcli]]. The ethernet (LAN) interfaces start with {{ic|en}}, e.g. {{ic|1=enp0s5}}}}<br />
<br />
==== Use dispatcher to connect to a VPN after a network connection is established ====<br />
<br />
In this example we want to connect automatically to a previously defined VPN connection after connecting to a specific Wi-Fi network. First thing to do is to create the dispatcher script that defines what to do after we are connected to the network.<br />
<br />
{{Note|This script will require {{Pkg|wireless_tools}} in order to use {{ic|iwgetid}}.}}<br />
<br />
===== Create the dispatcher script =====<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/vpn-up|<nowiki><br />
#!/bin/sh<br />
VPN_NAME="name of VPN connection defined in NetworkManager"<br />
ESSID="Wi-Fi network ESSID (not connection name)"<br />
<br />
interface=$1 status=$2<br />
case $status in<br />
up|vpn-down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
nmcli con up id "$VPN_NAME"<br />
fi<br />
;;<br />
down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
if nmcli con show --active | grep "$VPN_NAME"; then<br />
nmcli con down id "$VPN_NAME"<br />
fi<br />
fi<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
If you would like to attempt to automatically connect to VPN for all Wi-Fi networks, you can use the following definition of the ESSID: {{ic|1=ESSID=$(iwgetid -r)}}. Remember to set the script's permissions [[#Network services with NetworkManager dispatcher|accordingly]]. <br />
<br />
===== Give the script access to VPN password =====<br />
<br />
Trying to connect with the above script may still fail with {{ic|NetworkManager-dispatcher.service}} complaining about 'no valid VPN secrets', because of [http://developer.gnome.org/NetworkManager/0.9/secrets-flags.html the way VPN secrets are stored]. Fortunately, there are different options to give the above script access to your VPN password.<br />
<br />
1: One of them requires editing the VPN connection configuration file to make NetworkManager store the secrets by itself rather than inside a keyring [https://bugzilla.redhat.com/show_bug.cgi?id=710552 that will be inaccessible for root]: open up {{ic|/etc/NetworkManager/system-connections/''name of your VPN connection''}} and change the {{ic|password-flags}} and {{ic|secret-flags}} from {{ic|1}} to {{ic|0}}.<br />
<br />
If that alone doesn't work, you may have to create a {{ic|passwd-file}} in a safe location with the same permissions and ownership as the dispatcher script, containing the following:<br />
{{hc|/path/to/passwd-file|<nowiki><br />
vpn.secrets.password:YOUR_PASSWORD<br />
</nowiki>}}<br />
<br />
The script must be changed accordingly, so that it gets the password from the file:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/vpn-up|<nowiki><br />
#!/bin/sh<br />
VPN_NAME="name of VPN connection defined in NetworkManager"<br />
ESSID="Wi-Fi network ESSID (not connection name)"<br />
<br />
interface=$1 status=$2<br />
case $status in<br />
up|vpn-down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
nmcli con up id "$VPN_NAME" passwd-file /path/to/passwd-file<br />
fi<br />
;;<br />
down)<br />
if iwgetid | grep -qs ":\"$ESSID\""; then<br />
if nmcli con show --active | grep "$VPN_NAME"; then<br />
nmcli con down id "$VPN_NAME"<br />
fi<br />
fi<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
2: Alternatively, change the {{ic|password-flags}} and put the password directly in the configuration file adding the section {{ic|vpn-secrets}}:<br />
<br />
[vpn]<br />
....<br />
password-flags=0<br />
<br />
[vpn-secrets]<br />
password=''your_password''<br />
<br />
{{Note|It may now be necessary to re-open the NetworkManager connection editor and save the VPN passwords/secrets again.}}<br />
<br />
==== Use dispatcher to handle mounting of CIFS shares ====<br />
<br />
Some CIFS shares are only available on certain networks or locations (e.g. at home). You can use the dispatcher to only mount CIFS shares that are present at your current location.<br />
<br />
The following script will check if we connected to a specific network and mount shares accordingly:<br />
{{hc|/etc/NetworkManager/dispatcher.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
if [ "$2" = "up" ]; then<br />
if [ "$CONNECTION_UUID" = "uuid" ]; then<br />
mount /your/mount/point & <br />
# add more shares as needed<br />
fi<br />
fi<br />
</nowiki>}}<br />
{{Note|You can get a list of uuids using [[#nmcli|nmcli]].}}<br />
<br />
The following script will unmount all CIFS before a disconnect from a specific network:<br />
{{hc|/etc/NetworkManager/dispatcher.d/pre-down.d/mount_cifs|<nowiki><br />
#!/bin/bash<br />
umount -a -l -t cifs<br />
</nowiki>}}<br />
{{Note|Make sure this script is located in the pre-down.d subdirectory as shown above, otherwise it will unmount all shares on any connection state change.}}<br />
{{Note|Ever since NetworkManager 0.9.8, the 'pre-down' and 'down' actions are not executed on shutdown or restart, so the above script will only work if you manually disconnect from the network. See [https://bugzilla.gnome.org/show_bug.cgi?id&#61;701242 this bug report] for more info.}}<br />
<br />
As before, do not forget to set the script permissions [[#Network services with NetworkManager dispatcher|accordingly]].<br />
<br />
See also [[NFS#NetworkManager dispatcher]] for another example script that parses {{ic|/etc/fstab}} mounts during dispatcher actions.<br />
<br />
=== Proxy settings ===<br />
<br />
NetworkManager does not directly handle proxy settings, but if you are using GNOME or KDE, you could use [http://marin.jb.free.fr/proxydriver/ proxydriver] wich handles proxy settings using NetworkManager's informations. proxydriver is found in the package {{AUR|proxydriver}}.<br />
<br />
In order for ''proxydriver'' to be able to change the proxy settings, you would need to execute this command, as part of the GNOME startup process (System -> Preferences -> Startup Applications):<br />
<br />
xhost +si:localuser:''your_username''<br />
<br />
See: [[Proxy settings]].<br />
<br />
=== Disable NetworkManager ===<br />
<br />
It might not be obvious, but the service automatically starts through ''dbus''. To completely disable it you can [[mask]] the services {{ic|NetworkManager}} and {{ic|NetworkManager-dispatcher}}.<br />
<br />
=== Checking connectivity ===<br />
<br />
{{Accuracy|"the desktop manager" might handle captive portals, but this is mostly done through {{aur|capnet-assist}}}}<br />
<br />
NetworkManager can try to reach a page on Internet when connecting to a network. {{Pkg|networkmanager}} is configured by default in {{ic|/usr/lib/NetworkManager/conf.d/20-connectivity.conf}} to check connectivity to archlinux.org. To use a different webserver or disable connectivity checking edit {{ic|/etc/NetworkManager/NetworkManager.conf}}, see "connectivity section" in {{man|5|NetworkManager.conf}}.<br />
<br />
For those behind a captive portal, the desktop manager can automatically open a window asking for credentials.<br />
<br />
== Testing ==<br />
<br />
NetworkManager applets are designed to load upon login so no further configuration should be necessary for most users. If you have already disabled your previous network settings and disconnected from your network, you can now test if NetworkManager will work. The first step is to [[start]] {{ic|NetworkManager.service}}.<br />
<br />
Some applets will provide you with a {{ic|.desktop}} file so that the NetworkManager applet can be loaded through the application menu. If it does not, you are going to either have to discover the command to use or logout and login again to start the applet. Once the applet is started, it will likely begin polling network connections with for auto-configuration with a DHCP server.<br />
<br />
To start the GNOME applet in non-xdg-compliant window managers like [[awesome]]:<br />
<br />
nm-applet --sm-disable &<br />
<br />
For static IP addresses, you will have to configure NetworkManager to understand them. The process usually involves right-clicking the applet and selecting something like 'Edit Connections'.<br />
<br />
== Troubleshooting ==<br />
<br />
=== No prompt for password of secured Wi-Fi networks ===<br />
<br />
When trying to connect to a secured Wi-Fi network, no prompt for a password is shown and no connection is established. This happens when no keyring package is installed. An easy solution is to install {{Pkg|gnome-keyring}}. If you want the passwords to be stored in encrypted form, follow [[GNOME Keyring]] to set up the ''gnome-keyring-daemon''.<br />
<br />
=== No traffic via PPTP tunnel ===<br />
<br />
PPTP connection logins successfully; you see a ppp0 interface with the correct VPN IP address, but you cannot even ping the remote IP address. It is due to lack of MPPE (Microsoft Point-to-Point Encryption) support in stock Arch pppd. It is recommended to first try with the stock Arch {{Pkg|ppp}} as it may work as intended.<br />
<br />
To solve the problem it should be sufficient to install the {{AUR|ppp-mppe}}{{Broken package link|{{aur-mirror|ppp-mppe}}}} package.<br />
<br />
See also [[WPA2 Enterprise#MS-CHAPv2]].<br />
<br />
=== Network management disabled ===<br />
<br />
When NetworkManager shuts down but the pid (state) file is not removed, you will see a {{ic|Network management disabled}} message. If this happens, remove the file manually:<br />
<br />
# rm /var/lib/NetworkManager/NetworkManager.state<br />
<br />
=== Problems with internal DHCP client ===<br />
<br />
If you have problems with getting an IP address using the internal DHCP client, consider {{Pkg|dhclient}} as DHCP client.<br />
<br />
After installation, update the NetworkManager config file:<br />
<br />
{{hc|1=/etc/NetworkManager/NetworkManager.conf|2=<br />
[main]<br />
# ...<br />
dhcp=dhclient<br />
# ...<br />
}}<br />
<br />
This workaround might solve problems in big wireless networks like eduroam.<br />
<br />
=== Customizing resolv.conf ===<br />
<br />
See the main page: [[resolv.conf]]. If you use {{Pkg|dhclient}}, you may try the {{AUR|networkmanager-dispatch-resolv}}{{Broken package link|{{aur-mirror|networkmanager-dispatch-resolv}}}} package.<br />
<br />
=== DHCP problems with dhclient ===<br />
<br />
If you have problems with getting an IP address via DHCP, try to add the following to your {{ic|/etc/dhclient.conf}}:<br />
<br />
interface "eth0" {<br />
send dhcp-client-identifier 01:aa:bb:cc:dd:ee:ff;<br />
}<br />
<br />
Where {{ic|aa:bb:cc:dd:ee:ff}} is the MAC address of this NIC. The MAC address can be found using the {{ic|ip link show ''interface''}} command from the {{Pkg|iproute2}} package.<br />
<br />
=== Hostname problems ===<br />
<br />
NetworkManager utilizes {{Pkg|dhclient}} in default and falls back to its internal DHCP funtionality, if the former is not installed. To make ''dhclient'' forward the hostname requires to set a non-default option, ''dhcpcd'' forwards the hostname by default. <br />
<br />
First, check which DHCP client is used (''dhclient'' in this example):<br />
<br />
{{hc|<nowiki># journalctl -b | egrep "dhc"</nowiki>|<br />
...<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Nov 17 21:03:20 zenbook dhclient[2949]: Bound to *:546<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Listening on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: Sending on Socket/wlan0<br />
Nov 17 21:03:20 zenbook dhclient[2949]: XMT: Info-Request on wlan0, interval 1020ms.<br />
Nov 17 21:03:20 zenbook dhclient[2949]: RCV: Reply message on wlan0 from fe80::126f:3fff:fe0c:2dc.<br />
}}<br />
<br />
==== Configure dhclient to push the hostname to the DHCP server ====<br />
<br />
Copy the example configuration file:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient.conf<br />
<br />
Take a look at the file - there will only really be one line we want to keep and ''dhclient'' will use it's defaults (as it has been using if you did not have this file) for the other options. This is the important line:<br />
<br />
{{hc|/etc/dhclient.conf|2=send host-name = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
Force an IP address renewal by your favorite means, and you should now see your hostname on your DHCP server.<br />
<br />
IPv6 push host name:<br />
<br />
# cp /usr/share/dhclient/dhclient.conf.example /etc/dhclient6.conf<br />
<br />
{{hc|/etc/dhclient6.conf|2=send fqdn.fqdn = pick-first-value(gethostname(), "ISC-dhclient");}}<br />
<br />
==== Configure NetworkManager to use a specific DHCP client ====<br />
<br />
If you want to explicitly set the DHCP client used by NetworkManager, it can be set in the global configuration: <br />
<br />
{{hc|1=/etc/NetworkManager/NetworkManager.conf|2=dhcp=internal}}<br />
<br />
The alternative {{ic|1=dhcp=dhclient}} is used per default, if this option is not set. <br />
<br />
Then [[restart]] {{ic|NetworkManager.service}}.<br />
<br />
{{Note|1=Support for {{Pkg|dhcpcd}} has been [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/networkmanager&id=a1df79cbcebaec0c043789eb31965e57d17b6cdb disabled] in {{Pkg|networkmanager}}-1.0.0-2 (2015-02-14).}}<br />
<br />
=== Missing default route ===<br />
<br />
On at least one KDE4 system, no default route was created when establishing wireless connections with NetworkManager. Changing the route settings of the wireless connection to remove the default selection "Use only for resources on this connection" solved the issue.<br />
<br />
=== 3G modem not detected ===<br />
<br />
See [[USB 3G Modem#Network Manager]].<br />
<br />
=== Switching off WLAN on laptops ===<br />
<br />
Sometimes NetworkManager will not work when you disable your Wi-Fi adapter with a switch on your laptop and try to enable it again afterwards. This is often a problem with ''rfkill''. To check if the driver notifies ''rfkill'' about the wireless adapter's status, use:<br />
<br />
$ watch -n1 rfkill list all<br />
<br />
If one identifier stays blocked after you switch on the adapter you could try to manually unblock it with (where X is the number of the identifier provided by the above output):<br />
<br />
# rfkill event unblock X<br />
<br />
=== Static IP address settings revert to DHCP ===<br />
<br />
Due to an unresolved bug, when changing default connections to a static IP address, {{ic|nm-applet}} may not properly store the configuration change, and will revert to automatic DHCP.<br />
<br />
To work around this issue you have to edit the default connection (e.g. "Auto eth0") in {{ic|nm-applet}}, change the connection name (e.g. "my eth0"), uncheck the "Available to all users" checkbox, change your static IP address settings as desired, and click '''Apply'''. This will save a new connection with the given name.<br />
<br />
Next, you will want to make the default connection not connect automatically. To do so, run {{ic|nm-connection-editor}} ('''not''' as root). In the connection editor, edit the default connection (e.g. "Auto eth0") and uncheck "Connect automatically". Click '''Apply''' and close the connection editor.<br />
<br />
=== Cannot edit connections as normal user ===<br />
<br />
See [[#Set up PolicyKit permissions]].<br />
<br />
=== Forget hidden wireless network ===<br />
<br />
Since hidden networks are not displayed in the selection list of the Wireless view, they cannot be forgotten (removed) with the GUI. You can delete one with the following command:<br />
<br />
# rm /etc/NetworkManager/system-connections/''SSID''<br />
<br />
This works for any other connection.<br />
<br />
=== VPN not working in GNOME ===<br />
<br />
When setting up OpenConnect or vpnc connections in NetworkManager while using GNOME, you will sometimes never see the dialog box pop up and the following error appears in {{ic|/var/log/errors.log}}:<br />
<br />
localhost NetworkManager[399]: <error> [1361719690.10506] [nm-vpn-connection.c:1405] get_secrets_cb(): Failed to request VPN secrets #3: (6) No agents were available for this request.<br />
<br />
This is caused by the GNOME NM Applet expecting dialog scripts to be at {{ic|/usr/lib/gnome-shell}}, when NetworkManager's packages put them in {{ic|/usr/lib/networkmanager}}.<br />
As a "temporary" fix (this bug has been around for a while now), make the following symlink(s):<br />
<br />
* For OpenConnect: {{ic|ln -s /usr/lib/networkmanager/nm-openconnect-auth-dialog /usr/lib/gnome-shell/}}<br />
* For VPNC (i.e. Cisco VPN): {{ic|ln -s /usr/lib/networkmanager/nm-vpnc-auth-dialog /usr/lib/gnome-shell/}}<br />
<br />
This may need to be done for any other NM VPN plugins as well, but these are the two most common.<br />
<br />
=== Unable to connect to visible European wireless networks ===<br />
<br />
WLAN chips are shipped with a default [[Wireless network configuration#Respecting the regulatory domain|regulatory domain]]. If your access point does not operate within these limitations, you will not be able to connect to the network. Fixing this is easy:<br />
<br />
# [[Install]] {{Pkg|crda}}<br />
# Uncomment the correct Country Code in {{ic|/etc/conf.d/wireless-regdom}}<br />
# Reboot the system, because the setting is only read on boot<br />
<br />
=== Automatic connect to VPN on boot is not working ===<br />
<br />
The problem occurs when the system (i.e. NetworkManager running as the root user) tries to establish a VPN connection, but the password is not accessible because it is stored in the Gnome keyring of a particular user. <br />
<br />
A solution is to keep the password to your VPN in plaintext, as described in step (2.) of [[#Use dispatcher to connect to a VPN after a network connection is established]]. <br />
<br />
You do not need to use the dispatcher described in step (1.) to auto-connect anymore, if you use the new "auto-connect VPN" option from the {{ic|nm-applet}} GUI.<br />
<br />
=== Systemd Bottleneck ===<br />
<br />
Over time the log files ({{ic|/var/log/journal}}) can become very large. This can have a big impact on boot performance when using NetworkManager, see: [[Systemd#Boot time increasing over time]].<br />
<br />
=== Regular network disconnects, latency and lost packets (WiFi) ===<br />
<br />
NetworkManager does a scan every 2 minutes.<br />
<br />
Some WiFi drivers have issues when scanning for base stations whilst connected/associated. Symptoms include VPN disconnects/reconnects and lost packets, web pages failing to load and then refresh fine.<br />
<br />
Running {{ic|journalctl -f}} will indicate that this is taking place, messages like the following will be contained in the logs at regular intervals.<br />
<br />
NetworkManager[410]: <info> (wlp3s0): roamed from BSSID 00:14:48:11:20:CF (my-wifi-name) to (none) ((none))<br />
<br />
There is a patched version of NetworkManager which should prevent this type of scanning: {{AUR|networkmanager-noscan}}.<br />
<br />
Alternatively, if roaming is not important, the periodic scanning behavior can be disabled by locking the BSSID of the access point in the WiFi connection profile.<br />
<br />
=== Unable to turn on wi-fi with Lenovo laptop (IdeaPad, Legion, etc.) ===<br />
<br />
There is an issue with the {{ic|ideapad_laptop}} module on some Lenovo models due to the wi-fi driver incorrectly reporting a soft block. The card can still be manipulated with {{ic|netctl}}, but managers like NetworkManager break. You can verify that this is the problem by checking the output of {{ic|rfkill list}} after toggling your hardware switch and seeing that the soft block persists.<br />
<br />
{{Accuracy|Try to use {{ic|rfkill.default_state}} and {{ic|rfkill.master_switch_mode}} (see [https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt kernel-parameters.txt]) to fix the rfkill problem.}}<br />
<br />
[[modprobe|Unloading]] the {{ic|ideapad_laptop}} module should fix this. ('''warning''': this may disable the laptop keyboard and touchpad also!).<br />
<br />
== Tips and tricks ==<br />
<br />
=== Encrypted Wi-Fi passwords ===<br />
<br />
By default, NetworkManager stores passwords in clear text in the connection files at {{ic|/etc/NetworkManager/system-connections/}}. To print the stored passwords, use the following command:<br />
<br />
# grep -H '^psk=' /etc/NetworkManager/system-connections/*<br />
<br />
The passwords are accessible to the root user in the filesystem and to users with access to settings via the GUI (e.g. {{ic|nm-applet}}). <br />
<br />
It is preferable to save the passwords in encrypted form in a keyring instead of clear text. The downside of using a keyring is that the connections have to be set up for each user.<br />
<br />
====Using Gnome-Keyring====<br />
<br />
The keyring daemon has to be started and the keyring needs to be unlocked for the following to work.<br />
<br />
Furthermore, NetworkManager needs to be configured not to store the password for all users. Using GNOME {{ic|nm-applet}}, run {{ic|nm-connection-editor}} from a terminal, select a network connection, click {{ic|Edit}}, select the {{ic|Wifi-Security}} tab and click on the right icon of password and check {{ic|Store the password only for this user}}.<br />
<br />
====Using KDE Wallet====<br />
<br />
{{Out of date|{{Pkg|plasma-nm}} has a different interface.}}<br />
<br />
Using KDE's {{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}}, click the applet, click on the top right {{ic|Settings}} icon, double click on a network connection, in the {{ic|General settings}} tab, untick {{ic|all users may connect to this network}}. If the option is ticked, the passwords will still be stored in clear text, even if a keyring daemon is running.<br />
<br />
If the option was selected previously and you un-tick it, you may have to use the {{ic|reset}} option first to make the password disappear from the file. Alternatively, delete the connection first and set it up again.<br />
<br />
=== Sharing internet connection over Wi-Fi ===<br />
<br />
You can share your internet connection (e.g. 3G or wired) with a few clicks using nm. You will need a supported Wi-Fi card (Cards based on Atheros AR9xx or at least AR5xx are probably best choice). Please note that a [[firewall]] may interfere with internet sharing.<br />
<br />
==== Ad-hoc ====<br />
<br />
{{Style|"I think so"...}}<br />
<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* Custom {{ic|dnsmasq.conf}} may interfere with NetworkManager (not sure about this, but I think so).<br />
* Click on applet and choose "Create new wireless network".<br />
* Follow wizard (if using WEP, be sure to use 5 or 13 character long password, different lengths will fail).<br />
* Settings will remain stored for the next time you need it.<br />
<br />
==== Real AP ====<br />
<br />
Support of infrastructure mode (which is needed by Android phones as they intentionally do not support ad-hoc) is added by NetworkManager as of late 2012.<br />
<br />
See [https://fedoraproject.org/wiki/Features/RealHotspot Fedora's wiki].<br />
<br />
=== Sharing internet connection over Ethernet ===<br />
<br />
Scenario: your device has internet connection over wi-fi and you want to share the internet connection to other devices over ethernet.<br />
<br />
Requirements:<br />
* [[Install]] the {{Pkg|dnsmasq}} package to be able to actually share the connection.<br />
* Your internet connected device and the other devices are connected over a suitable ethernet cable (this usually means a cross over cable or a switch in between).<br />
* Internet sharing is not blocked by a [[firewall]].<br />
<br />
Steps:<br />
* Run {{ic|nm-connection-editor}} from terminal.<br />
* Add a new ethernet connection.<br />
* Give it some sensible name. For example "Shared Internet"<br />
* Go to "IPv4 Settings".<br />
* For "Method:" select "Shared to other computers".<br />
* Save<br />
<br />
Now you should have a new option "Shared Internet" under the Wired connections in NetworkManager.<br />
<br />
=== Checking if networking is up inside a cron job or script ===<br />
<br />
Some ''cron'' jobs require networking to be up to succeed. You may wish to avoid running these jobs when the network is down. To accomplish this, add an '''if''' test for networking that queries NetworkManager's ''nm-tool'' and checks the state of networking. The test shown here succeeds if any interface is up, and fails if they are all down. This is convenient for laptops that might be hardwired, might be on wireless, or might be off the network.<br />
<br />
{{bc|<nowiki><br />
if [ $(nm-tool|grep State|cut -f2 -d' ') == "connected" ]; then<br />
#Whatever you want to do if the network is online<br />
else<br />
#Whatever you want to do if the network is offline - note, this and the else above are optional<br />
fi<br />
</nowiki>}}<br />
<br />
This useful for a {{ic|cron.hourly}} script that runs ''fpupdate'' for the F-Prot virus scanner signature update, as an example. Another way it might be useful, with a little modification, is to differentiate between networks using various parts of the output from ''nm-tool''; for example, since the active wireless network is denoted with an asterisk, you could grep for the network name and then grep for a literal asterisk.<br />
<br />
=== Connect to network with secret on boot ===<br />
<br />
By default, NetworkManager will not connect to networks requiring a secret automatically on boot. This is because it locks such connections to the user who makes it by default, only connecting after they have logged in. To change this, do the following:<br />
<br />
# Right click on the {{ic|nm-applet}} icon in your panel and select Edit Connections and open the Wireless tab<br />
# Select the connection you want to work with and click the Edit button<br />
# Check the boxes “Connect Automatically” and “Available to all users”<br />
Log out and log back in to complete.<br />
<br />
=== Automatically unlock keyring after login ===<br />
<br />
NetworkManager requires access to the login keyring to connect to networks requiring a secret. Under most circumstances, this keyring is unlocked automatically at login, but if it isn't, and NetworkManager isn't connecting on login, you can try the following.<br />
<br />
==== GNOME ====<br />
<br />
{{Note|The following method is dated and known not to work on at least one machine!}}<br />
* In {{ic|/etc/pam.d/gdm}} (or your corresponding daemon in {{ic|/etc/pam.d}}), add these lines at the end of the "auth" and "session" blocks if they do not exist already: <br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
* In {{ic|/etc/pam.d/passwd}}, use this line for the 'password' block:<br />
password optional pam_gnome_keyring.so<br />
<br />
:Next time you log in, you should be asked if you want the password to be unlocked automatically on login.<br />
<br />
==== SLiM login manager ====<br />
<br />
See [[SLiM#Gnome Keyring]].<br />
<br />
==== Troubleshooting ====<br />
<br />
While you may type both values at connection time, {{Pkg|kdeplasma-applets-plasma-nm}}{{Broken package link|{{aur-mirror|kdeplasma-applets-plasma-nm}}}} 0.9.3.2-1 and above are capable of retrieving OpenConnect username and password directly from KWallet.<br />
<br />
Open "KDE Wallet Manager" and look up your OpenConnect VPN connection under "Network Management|Maps". Click "Show values" and <br />
enter your credentials in key "VpnSecrets" in this form (replace ''username'' and ''password'' accordingly):<br />
<br />
form:main:username%SEP%''username''%SEP%form:main:password%SEP%''password''<br />
<br />
Next time you connect, username and password should appear in the "VPN secrets" dialog box.<br />
<br />
=== Ignore specific devices ===<br />
<br />
Sometimes it may be desired that NetworkManager ignores specific devices and does not try to configure addresses and routes for them. You can quickly and easily ignore devices by MAC or interface-name by using the following in {{ic|/etc/NetworkManager/NetworkManager.conf}}:<br />
[keyfile]<br />
unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth0<br />
After you have put this in, [[Daemon|restart]] NetworkManager, and you should be able to configure interfaces without NetworkManager altering what you have set.<br />
<br />
=== Enable DNS Caching ===<br />
<br />
See [[dnsmasq#NetworkManager]] to enable the plugin that allows DNS caching using [[dnsmasq]].<br />
<br />
=== Configuring MAC Address Randomization ===<br />
<br />
MAC randomization can be used for increased privacy by not disclosing your real MAC address to the network.<br />
<br />
NetworkManager supports two types MAC Address Randomization: randomization during scanning, and for network connections. Both modes can be configured by modifying {{ic|/etc/NetworkManager/NetworkManager.conf}} or by creating a separate configuration file in {{ic|/etc/NetworkManager/conf.d}} which is recommended since the aforementioned config file may be overwritten by NetworkManager.<br />
<br />
Randomization during Wi-Fi scanning is enabled by default, but it may be disabled by adding the following lines to {{ic|/etc/NetworkManager/NetworkManager.conf}} or a dedicated configuration file under {{ic|/etc/NetworkManager/conf.d}}. This results in a randomly generated MAC address being used when probing for wireless networks.<br />
<br />
[device]<br />
wifi.scan-rand-mac-address=no<br />
<br />
{{Tip|1=Disabling MAC address randomization may be needed for stable connection. See [https://bbs.archlinux.org/viewtopic.php?id=220101].}}<br />
<br />
MAC randomization for network connections can be set to different modes for both wireless and ethernet interfaces. See [https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/ the Gnome blog post] for more details on the different modes. <br />
<br />
In terms of MAC randomization the most important modes are stable and random. Stable generates a random MAC address when you connect to a new network and associates the two permanently. This means that you will use the same MAC address every time you connect to that network. In contrast, random will generate a new MAC address every time you connect to a network, new or previously known. You can configure the MAC randomization by adding the desired configuration under {{ic|/etc/NetworkManager/conf.d}}.<br />
<br />
[device-mac-randomization]<br />
# "yes" is already the default for scanning<br />
wifi.scan-rand-mac-address=yes<br />
<br />
[connection-mac-randomization]<br />
# Randomize MAC for every ethernet connection<br />
ethernet.cloned-mac-address=random<br />
# Generate a random MAC for each WiFi and associate the two permanently.<br />
wifi.cloned-mac-address=stable<br />
<br />
You can read more about it [https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/ here]<br />
<br />
=== Enable IPv6 Privacy Extensions ===<br />
<br />
See [[IPv6#NetworkManager]].<br />
<br />
=== Working with wired connections ===<br />
<br />
By default, NetworkManager generates a connection profile for each wired ethernet connection it finds. At the point when generating the connection, it does not know whether there will be more ethernet adapters available. Hence, it calls the first wired connection "Wired connection 1". You can avoid generating this connection, by configuring "no-auto-default" (see `man NetworkManager.conf`), or by simply deleting it. Then NetworkManager will remember not to generate a connection for this interface again.<br />
<br />
You can also edit the connection (and persist it to disk) or delete it. NetworkManager will not re-generate a new connection. Then you can change the name to whatever you want. You can use something like nm-connection-editor for this task.<br />
<br />
== See also ==<br />
<br />
* [http://blogs.gnome.org/dcbw/2015/02/16/networkmanager-for-administrators-part-1/ NetworkManager for Administrators Part 1]<br />
* [[Wikipedia:NetworkManager]]</div>RevolverXDhttps://wiki.archlinux.org/index.php?title=Nextcloud&diff=271004Nextcloud2013-08-13T13:03:15Z<p>RevolverXD: /* Seeing white page after login */</p>
<hr />
<div>[[Category:Web Server]]<br />
[[fr:Owncloud]]<br />
[[ja:Owncloud]]<br />
From [[Wikipedia:ownCloud|Wikipedia]]:<br />
: ''ownCloud is a software suite that provides a location-independent storage area for data (cloud storage).''<br />
<br />
== Installation ==<br />
<br />
{{AUR|owncloud}} is available in the [[AUR]].<br />
# First of all set up the [[LAMP]] stack. You will probably need to install the MDB2 pear package as well: {{ic|# pear install mdb2}}<br />
# Install the {{AUR|owncloud}} package as described in [[AUR#Installing_packages|AUR wiki page]].<br />
# Copy {{ic|/usr/share/doc/owncloud/examples/apache.conf_example}} to {{ic|/etc/httpd/conf/extra/owncloud.conf}} (if using owncloud-git)<br />
# Add the following lines into {{ic|/etc/httpd/conf/httpd.conf}} (php5 should have been configured during the LAMP stack setup):<br />
Include /etc/httpd/conf/extra/owncloud.conf<br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
Uncomment extensions in {{ic|/etc/php/php.ini}}:<br />
gd.so<br />
intl.so<br />
openssl.so<br />
xmlrpc.so<br />
zip.so<br />
iconv.so<br />
Depending on which database backend you are going to use uncomment either one of the following extensions in {{ic|/etc/php/php.ini}}:<br />
sqlite.so<br />
sqlite3.so<br />
pdo_sqlite.so<br />
'''or''':<br />
mysql.so<br />
mysqli.so<br />
pdo_mysql.so<br />
Now [[Daemons#Restarting|restart]] httpd (Apache) and open [http://localhost http://localhost] in your browser. You should now be able to create a user account and follow the installation wizard.<br />
<br />
== Custom configurations ==<br />
<br />
=== Filesize limitations ===<br />
<br />
With the default configuration ownCloud only allows the upload of filesizes less than 2MB.<br />
This can be changed by changing the following line in {{ic|/etc/php/php.ini}} to your liking.<br />
<br />
'''As of version 4.0 this is no longer necessary! The maximum upload size is now set via the ownCloud gui'''<br />
upload_max_filesize = 2M<br />
<br />
As of version 4.5, upload limits are set in {{ic|/usr/share/webapps/owncloud/.htaccess}}. This won't work if [[LAMP#Using_php5_with_apache2-mpm-worker_and_mod_fcgid|PHP is set up to run as CGI]], so you need to change the limits in {{ic|/etc/php/php.ini}}. You also need to change open_basedir.<br />
{{bc|<nowiki><br />
upload_max_filesize = 512M<br />
post_max_size = 512M<br />
memory_limit = 512M<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/<br />
</nowiki>}}<br />
<br />
=== Running ownCloud in a subdirectory ===<br />
<br />
By including the default '''owncloud.conf''' in '''httpd.conf''', owncloud will take control of port 80 and your localhost domain. If you would like to have owncloud run in a subdirectory, then skip the 'Include /etc/httpd/conf/extra/owncloud.conf' line altogether and just use a symbolic link like so: <br />
# ln -s /usr/share/webapps/owncloud/ /srv/http/<br />
<br />
In that case, you'll also have to ensure /usr/share/webapps is in the open_basedir line of php.ini, and that per-directory .htaccess files are read by apache. <br />
<br />
Alternatively, you could follow the standard procedure, but comment out the VirtualHost part of the include file, and skip the symlink/basedir/htaccess part.<br />
<br />
== Filling ownCloud with data ==<br />
<br />
=== Small files ===<br />
<br />
==== WebDav ====<br />
<br />
Always use [[WebDAV]] or the web interface to add new files to your ownCloud. Otherwise they will not show up correctly, as they do not get indexed right.<br />
No further configuration is necessary to enable [[WebDAV]] uploads in ownCloud. <br />
<br />
Consider installing and enabling [[php-apc]] to speed up WebDAV.<br />
<br />
==== SABnzbd ====<br />
<br />
When using [[SABnzbd]], you might want to set<br />
folder_rename 0<br />
in your sabnzbd.ini file, because ownCloud will scan the files as soon as they get uploaded, preventing SABnzbd from removing UNPACKING prefixes etc.<br />
<br />
=== Big files ===<br />
<br />
WebDAV isn't suitable for big files, because it fills up all the RAM and CPU.<br />
<br />
With the current version, it looks like, there is no good way of copying huge amounts of data to your ownCloud.<br />
<br />
Here's a Workaround:<br />
<br />
Copy the files directly to your ownCloud and do a full re-scan of your database (you could use the [http://apps.owncloud.com/content/show.php?content=151948&forumpage=0&PHPSESSID=37b915160effcc0f37cc761ad2ab88be Re-scan filesystem] add-on for example).<br />
<br />
But beware that this will not work as easily in the future, when end-to-end encryption gets added to ownCloud (this is a planned feature).<br />
<br />
== Important notes ==<br />
<br />
* When using a subdomain (like cloud.example.net), make sure it is covered by your certificate. Otherwise, connection via the owncloud client or webdav might fail.<br />
<br />
* If you are planning on using OwnCloud's [http://owncloud.org/sync-clients/ sync-clients], make sure to have [[NTP]] installed and running on your OwnCloud server, otherwise the sync-clients will fail.<br />
<br />
* Add some [[LAMP#SSL|SSL encryption]] to your connection!<br />
<br />
* More Apps for ownCloud can be found [http://apps.owncloud.com/ here]<br />
<br />
* To install an new application, download the zip from the apps store, extract it into /srv/http/owncloud/apps/.<br />
Afterwards restart httpd:<br />
<br />
systemctl restart httpd<br />
<br />
log into your server go to the app sections you should see the new apps in there,<br />
<br />
== Nginx + uwsgi_php alternative ==<br />
<br />
You can avoid the use of Apache, and run owncloud in it's own process by using the [https://aur.archlinux.org/packages.php?ID=63798 wsgi_php] application server. uWSGI itself has a wealth of features to limit the resource use, and to harden the security of the application, and by being a separate process it can run under its own user.<br />
<br />
The nginx config is:<br />
{{bc|<nowiki><br />
#this is to avoid Request Entity Too Large error<br />
client_max_body_size 1000M;<br />
# deny access to some special files<br />
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {<br />
deny all;<br />
}<br />
# pass all .php or .php/path urls to uWSGI<br />
location ~ ^(.+\.php)(.*)$ {<br />
include uwsgi_params;<br />
uwsgi_modifier1 14;<br />
uwsgi_pass 127.0.0.1:3001;<br />
}<br />
# everything else goes to the filesystem,<br />
# but / will be mapped to index.php and run through uwsgi<br />
location / {<br />
root /usr/share/webapps/owncloud;<br />
index index.php;<br />
}<br />
</nowiki>}}<br />
The uWSGI /etc/uwsgi/owncloud.ini config file (run it with uwsgi_php --ini /etc/uwsgi/owncloud.ini):<br />
{{bc|<nowiki><br />
[uwsgi]<br />
socket = 127.0.0.1:3001<br />
master = true<br />
chdir = /srv/http/owncloud<br />
php-docroot = /usr/share/webapps/owncloud<br />
php-index = index.php<br />
<br />
# only allow these php files, I don't want to inadvertently run something else<br />
php-allowed-ext = /index.php<br />
php-allowed-ext = /public.php<br />
php-allowed-ext = /remote.php<br />
php-allowed-ext = /cron.php<br />
php-allowed-ext = /status.php<br />
php-allowed-ext = /settings/apps.php<br />
php-allowed-ext = /core/ajax/update.php<br />
php-allowed-ext = /core/ajax/share.php<br />
php-allowed-ext = /core/ajax/requesttoken.php<br />
php-allowed-ext = /core/ajax/translations.php<br />
php-allowed-ext = /search/ajax/search.php<br />
php-allowed-ext = /search/templates/part.results.php<br />
php-allowed-ext = /settings/admin.php<br />
php-allowed-ext = /settings/users.php<br />
php-allowed-ext = /settings/personal.php<br />
php-allowed-ext = /settings/help.php<br />
php-allowed-ext = /settings/ajax/getlog.php<br />
php-allowed-ext = /settings/ajax/setlanguage.php<br />
php-allowed-ext = /settings/ajax/setquota.php<br />
php-allowed-ext = /settings/ajax/userlist.php<br />
php-allowed-ext = /settings/ajax/createuser.php<br />
php-allowed-ext = /settings/ajax/removeuser.php<br />
php-allowed-ext = /settings/ajax/enableapp.php<br />
php-allowed-ext = /core/ajax/appconfig.php<br />
<br />
php-set = date.timezone=Europe/Skopje<br />
php-set = open_basedir=/srv/http/owncloud:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud<br />
<br />
processes = 10<br />
cheaper = 2<br />
cron = -1 -1 -1 -1 -1 /usr/bin/curl -H https://localhost/cron.php<br />
<br />
</nowiki>}}<br />
Finally, a simple systemd unit file to start the uwsgi instance can be (this is without using the emperor):<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=OwnCloud service via uWSGI-PHP<br />
<br />
[Service]<br />
User=http<br />
ExecStart=/usr/bin/uwsgi_php --ini /etc/uwsgi/owncloud.ini<br />
ExecReload=/bin/kill -HUP $MAINPID<br />
KillSignal=SIGQUIT<br />
Restart=always<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Sync Clients ==<br />
<br />
The offical clients can be found in this page : [http://owncloud.org/install/ Sync Clients]<br />
Also take notice that while the offical owncloud android app is a payed app on the play store, it is not a payed app on [https://f-droid.org/ F-Droid].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Self-signed certificate not accepted ===<br />
<br />
OwnCloud uses [[Wikipedia:cURL]] and [[Wikipedia:SabreDAV]] to check if [[WebDAV]] is enabled. If you use a SSL/TLS with a self-signed certificate, e.g. as shown in [[LAMP]] and access ownClouds admin panel, you will see the following error message:<br />
<br />
Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.<br />
<br />
In order to circumvent this problem a few solutions are available. One is to turn off the {{Ic|VERYFIPEER}}-parameter in cURL which is strongly discouraged as it will effectively render any encryption useless (see: https://github.com/owncloud/core/issues/1909#issuecomment-14107259). <br />
<br />
A better way is to trust your own certificate. Assuming that you followed the [[LAMP]]-tutorial, execute the following steps:<br />
<br />
Create local directory for non-distribution certificates and copy [[LAMP]]s certificate there. This will prevent {{Ic|ca-certificates}}-updates to overwrite it.<br />
<br />
$ mkdir -p /usr/local/share/ca-certificates<br />
$ cp /etc/httpd/conf/server.crt /usr/local/share/ca-certificates/''WWW.EXAMPLE.COM.crt''<br />
<br />
Add ''WWW.EXAMPLE.COM.crt'' to {{ic|/etc/ca-certificates.conf}}:<br />
<br />
''WWW.EXAMPLE.COM.crt''<br />
<br />
Now, regenerate your certificate store:<br />
<br />
$ update-ca-certificates<br />
<br />
Restart the httpd service to activate your certificate.<br />
<br />
=== Can't create data directory (/path/to/dir) ===<br />
<br />
Check your httpd conf file (like owncloud.conf). Add your data dir to <br />
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/path/to/dir/"<br />
<br />
Restart the httpd service to activate the change.<br />
<br />
=== CSync faild to find a specific file. ===<br />
<br />
Most probably a certificate issue, recreate it, and don't leave the common name empty or you will see the error again.<br />
<br />
openssl genrsa -out server.key 2048<br />
openssl req -new -key server.key -x509 -days 365 -out server.crt<br />
<br />
=== Seeing white page after login ===<br />
<br />
The cause is probably a new app that you installed, to fix that you can either use phpMyAdmin by editing the oc_appconfig table(in the case you got lucky and the table has edit option) or do it by hand with mysql:<br />
<br />
mysql -u root -p owncloud<br />
MariaDB [owncloud]> '''delete from''' oc_appconfig '''where''' appid='<nameOfExtension>' '''and''' configkey='enabled' '''and''' configvalue='yes'<br />
MariaDB [owncloud]> '''insert into''' oc_appconfig (appid,configkey,configvalue) '''values''' ('<nameOfExtension>','enabled','no');<br />
<br />
This should delete the relevant configuration from the table and add it again.</div>RevolverXDhttps://wiki.archlinux.org/index.php?title=Nextcloud&diff=271003Nextcloud2013-08-13T13:02:59Z<p>RevolverXD: /* Seeing white page after login */</p>
<hr />
<div>[[Category:Web Server]]<br />
[[fr:Owncloud]]<br />
[[ja:Owncloud]]<br />
From [[Wikipedia:ownCloud|Wikipedia]]:<br />
: ''ownCloud is a software suite that provides a location-independent storage area for data (cloud storage).''<br />
<br />
== Installation ==<br />
<br />
{{AUR|owncloud}} is available in the [[AUR]].<br />
# First of all set up the [[LAMP]] stack. You will probably need to install the MDB2 pear package as well: {{ic|# pear install mdb2}}<br />
# Install the {{AUR|owncloud}} package as described in [[AUR#Installing_packages|AUR wiki page]].<br />
# Copy {{ic|/usr/share/doc/owncloud/examples/apache.conf_example}} to {{ic|/etc/httpd/conf/extra/owncloud.conf}} (if using owncloud-git)<br />
# Add the following lines into {{ic|/etc/httpd/conf/httpd.conf}} (php5 should have been configured during the LAMP stack setup):<br />
Include /etc/httpd/conf/extra/owncloud.conf<br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
Uncomment extensions in {{ic|/etc/php/php.ini}}:<br />
gd.so<br />
intl.so<br />
openssl.so<br />
xmlrpc.so<br />
zip.so<br />
iconv.so<br />
Depending on which database backend you are going to use uncomment either one of the following extensions in {{ic|/etc/php/php.ini}}:<br />
sqlite.so<br />
sqlite3.so<br />
pdo_sqlite.so<br />
'''or''':<br />
mysql.so<br />
mysqli.so<br />
pdo_mysql.so<br />
Now [[Daemons#Restarting|restart]] httpd (Apache) and open [http://localhost http://localhost] in your browser. You should now be able to create a user account and follow the installation wizard.<br />
<br />
== Custom configurations ==<br />
<br />
=== Filesize limitations ===<br />
<br />
With the default configuration ownCloud only allows the upload of filesizes less than 2MB.<br />
This can be changed by changing the following line in {{ic|/etc/php/php.ini}} to your liking.<br />
<br />
'''As of version 4.0 this is no longer necessary! The maximum upload size is now set via the ownCloud gui'''<br />
upload_max_filesize = 2M<br />
<br />
As of version 4.5, upload limits are set in {{ic|/usr/share/webapps/owncloud/.htaccess}}. This won't work if [[LAMP#Using_php5_with_apache2-mpm-worker_and_mod_fcgid|PHP is set up to run as CGI]], so you need to change the limits in {{ic|/etc/php/php.ini}}. You also need to change open_basedir.<br />
{{bc|<nowiki><br />
upload_max_filesize = 512M<br />
post_max_size = 512M<br />
memory_limit = 512M<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/<br />
</nowiki>}}<br />
<br />
=== Running ownCloud in a subdirectory ===<br />
<br />
By including the default '''owncloud.conf''' in '''httpd.conf''', owncloud will take control of port 80 and your localhost domain. If you would like to have owncloud run in a subdirectory, then skip the 'Include /etc/httpd/conf/extra/owncloud.conf' line altogether and just use a symbolic link like so: <br />
# ln -s /usr/share/webapps/owncloud/ /srv/http/<br />
<br />
In that case, you'll also have to ensure /usr/share/webapps is in the open_basedir line of php.ini, and that per-directory .htaccess files are read by apache. <br />
<br />
Alternatively, you could follow the standard procedure, but comment out the VirtualHost part of the include file, and skip the symlink/basedir/htaccess part.<br />
<br />
== Filling ownCloud with data ==<br />
<br />
=== Small files ===<br />
<br />
==== WebDav ====<br />
<br />
Always use [[WebDAV]] or the web interface to add new files to your ownCloud. Otherwise they will not show up correctly, as they do not get indexed right.<br />
No further configuration is necessary to enable [[WebDAV]] uploads in ownCloud. <br />
<br />
Consider installing and enabling [[php-apc]] to speed up WebDAV.<br />
<br />
==== SABnzbd ====<br />
<br />
When using [[SABnzbd]], you might want to set<br />
folder_rename 0<br />
in your sabnzbd.ini file, because ownCloud will scan the files as soon as they get uploaded, preventing SABnzbd from removing UNPACKING prefixes etc.<br />
<br />
=== Big files ===<br />
<br />
WebDAV isn't suitable for big files, because it fills up all the RAM and CPU.<br />
<br />
With the current version, it looks like, there is no good way of copying huge amounts of data to your ownCloud.<br />
<br />
Here's a Workaround:<br />
<br />
Copy the files directly to your ownCloud and do a full re-scan of your database (you could use the [http://apps.owncloud.com/content/show.php?content=151948&forumpage=0&PHPSESSID=37b915160effcc0f37cc761ad2ab88be Re-scan filesystem] add-on for example).<br />
<br />
But beware that this will not work as easily in the future, when end-to-end encryption gets added to ownCloud (this is a planned feature).<br />
<br />
== Important notes ==<br />
<br />
* When using a subdomain (like cloud.example.net), make sure it is covered by your certificate. Otherwise, connection via the owncloud client or webdav might fail.<br />
<br />
* If you are planning on using OwnCloud's [http://owncloud.org/sync-clients/ sync-clients], make sure to have [[NTP]] installed and running on your OwnCloud server, otherwise the sync-clients will fail.<br />
<br />
* Add some [[LAMP#SSL|SSL encryption]] to your connection!<br />
<br />
* More Apps for ownCloud can be found [http://apps.owncloud.com/ here]<br />
<br />
* To install an new application, download the zip from the apps store, extract it into /srv/http/owncloud/apps/.<br />
Afterwards restart httpd:<br />
<br />
systemctl restart httpd<br />
<br />
log into your server go to the app sections you should see the new apps in there,<br />
<br />
== Nginx + uwsgi_php alternative ==<br />
<br />
You can avoid the use of Apache, and run owncloud in it's own process by using the [https://aur.archlinux.org/packages.php?ID=63798 wsgi_php] application server. uWSGI itself has a wealth of features to limit the resource use, and to harden the security of the application, and by being a separate process it can run under its own user.<br />
<br />
The nginx config is:<br />
{{bc|<nowiki><br />
#this is to avoid Request Entity Too Large error<br />
client_max_body_size 1000M;<br />
# deny access to some special files<br />
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {<br />
deny all;<br />
}<br />
# pass all .php or .php/path urls to uWSGI<br />
location ~ ^(.+\.php)(.*)$ {<br />
include uwsgi_params;<br />
uwsgi_modifier1 14;<br />
uwsgi_pass 127.0.0.1:3001;<br />
}<br />
# everything else goes to the filesystem,<br />
# but / will be mapped to index.php and run through uwsgi<br />
location / {<br />
root /usr/share/webapps/owncloud;<br />
index index.php;<br />
}<br />
</nowiki>}}<br />
The uWSGI /etc/uwsgi/owncloud.ini config file (run it with uwsgi_php --ini /etc/uwsgi/owncloud.ini):<br />
{{bc|<nowiki><br />
[uwsgi]<br />
socket = 127.0.0.1:3001<br />
master = true<br />
chdir = /srv/http/owncloud<br />
php-docroot = /usr/share/webapps/owncloud<br />
php-index = index.php<br />
<br />
# only allow these php files, I don't want to inadvertently run something else<br />
php-allowed-ext = /index.php<br />
php-allowed-ext = /public.php<br />
php-allowed-ext = /remote.php<br />
php-allowed-ext = /cron.php<br />
php-allowed-ext = /status.php<br />
php-allowed-ext = /settings/apps.php<br />
php-allowed-ext = /core/ajax/update.php<br />
php-allowed-ext = /core/ajax/share.php<br />
php-allowed-ext = /core/ajax/requesttoken.php<br />
php-allowed-ext = /core/ajax/translations.php<br />
php-allowed-ext = /search/ajax/search.php<br />
php-allowed-ext = /search/templates/part.results.php<br />
php-allowed-ext = /settings/admin.php<br />
php-allowed-ext = /settings/users.php<br />
php-allowed-ext = /settings/personal.php<br />
php-allowed-ext = /settings/help.php<br />
php-allowed-ext = /settings/ajax/getlog.php<br />
php-allowed-ext = /settings/ajax/setlanguage.php<br />
php-allowed-ext = /settings/ajax/setquota.php<br />
php-allowed-ext = /settings/ajax/userlist.php<br />
php-allowed-ext = /settings/ajax/createuser.php<br />
php-allowed-ext = /settings/ajax/removeuser.php<br />
php-allowed-ext = /settings/ajax/enableapp.php<br />
php-allowed-ext = /core/ajax/appconfig.php<br />
<br />
php-set = date.timezone=Europe/Skopje<br />
php-set = open_basedir=/srv/http/owncloud:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud<br />
<br />
processes = 10<br />
cheaper = 2<br />
cron = -1 -1 -1 -1 -1 /usr/bin/curl -H https://localhost/cron.php<br />
<br />
</nowiki>}}<br />
Finally, a simple systemd unit file to start the uwsgi instance can be (this is without using the emperor):<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=OwnCloud service via uWSGI-PHP<br />
<br />
[Service]<br />
User=http<br />
ExecStart=/usr/bin/uwsgi_php --ini /etc/uwsgi/owncloud.ini<br />
ExecReload=/bin/kill -HUP $MAINPID<br />
KillSignal=SIGQUIT<br />
Restart=always<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Sync Clients ==<br />
<br />
The offical clients can be found in this page : [http://owncloud.org/install/ Sync Clients]<br />
Also take notice that while the offical owncloud android app is a payed app on the play store, it is not a payed app on [https://f-droid.org/ F-Droid].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Self-signed certificate not accepted ===<br />
<br />
OwnCloud uses [[Wikipedia:cURL]] and [[Wikipedia:SabreDAV]] to check if [[WebDAV]] is enabled. If you use a SSL/TLS with a self-signed certificate, e.g. as shown in [[LAMP]] and access ownClouds admin panel, you will see the following error message:<br />
<br />
Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.<br />
<br />
In order to circumvent this problem a few solutions are available. One is to turn off the {{Ic|VERYFIPEER}}-parameter in cURL which is strongly discouraged as it will effectively render any encryption useless (see: https://github.com/owncloud/core/issues/1909#issuecomment-14107259). <br />
<br />
A better way is to trust your own certificate. Assuming that you followed the [[LAMP]]-tutorial, execute the following steps:<br />
<br />
Create local directory for non-distribution certificates and copy [[LAMP]]s certificate there. This will prevent {{Ic|ca-certificates}}-updates to overwrite it.<br />
<br />
$ mkdir -p /usr/local/share/ca-certificates<br />
$ cp /etc/httpd/conf/server.crt /usr/local/share/ca-certificates/''WWW.EXAMPLE.COM.crt''<br />
<br />
Add ''WWW.EXAMPLE.COM.crt'' to {{ic|/etc/ca-certificates.conf}}:<br />
<br />
''WWW.EXAMPLE.COM.crt''<br />
<br />
Now, regenerate your certificate store:<br />
<br />
$ update-ca-certificates<br />
<br />
Restart the httpd service to activate your certificate.<br />
<br />
=== Can't create data directory (/path/to/dir) ===<br />
<br />
Check your httpd conf file (like owncloud.conf). Add your data dir to <br />
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/path/to/dir/"<br />
<br />
Restart the httpd service to activate the change.<br />
<br />
=== CSync faild to find a specific file. ===<br />
<br />
Most probably a certificate issue, recreate it, and don't leave the common name empty or you will see the error again.<br />
<br />
openssl genrsa -out server.key 2048<br />
openssl req -new -key server.key -x509 -days 365 -out server.crt<br />
<br />
=== Seeing white page after login ===<br />
<br />
The cause is probably a new app that you installed, to fix that you can either use phpMyAdmin by editing the oc_appconfig table(in the case you got lucky and the table has edit option) or do it by hand with mysql:<br />
<br />
mysql -u root -p owncloud<br />
MariaDB [owncloud]> '''delete from''' oc_appconfig '''where''' appid='<nameOfExtension>' '''and''' configkey='enabled' and configvalue='yes'<br />
MariaDB [owncloud]> '''insert into''' oc_appconfig (appid,configkey,configvalue) '''values''' ('<nameOfExtension>','enabled','no');<br />
<br />
This should delete the relevant configuration from the table and add it again.</div>RevolverXDhttps://wiki.archlinux.org/index.php?title=Nextcloud&diff=271002Nextcloud2013-08-13T12:59:38Z<p>RevolverXD: /* CSync faild to find a specific file. */</p>
<hr />
<div>[[Category:Web Server]]<br />
[[fr:Owncloud]]<br />
[[ja:Owncloud]]<br />
From [[Wikipedia:ownCloud|Wikipedia]]:<br />
: ''ownCloud is a software suite that provides a location-independent storage area for data (cloud storage).''<br />
<br />
== Installation ==<br />
<br />
{{AUR|owncloud}} is available in the [[AUR]].<br />
# First of all set up the [[LAMP]] stack. You will probably need to install the MDB2 pear package as well: {{ic|# pear install mdb2}}<br />
# Install the {{AUR|owncloud}} package as described in [[AUR#Installing_packages|AUR wiki page]].<br />
# Copy {{ic|/usr/share/doc/owncloud/examples/apache.conf_example}} to {{ic|/etc/httpd/conf/extra/owncloud.conf}} (if using owncloud-git)<br />
# Add the following lines into {{ic|/etc/httpd/conf/httpd.conf}} (php5 should have been configured during the LAMP stack setup):<br />
Include /etc/httpd/conf/extra/owncloud.conf<br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
Uncomment extensions in {{ic|/etc/php/php.ini}}:<br />
gd.so<br />
intl.so<br />
openssl.so<br />
xmlrpc.so<br />
zip.so<br />
iconv.so<br />
Depending on which database backend you are going to use uncomment either one of the following extensions in {{ic|/etc/php/php.ini}}:<br />
sqlite.so<br />
sqlite3.so<br />
pdo_sqlite.so<br />
'''or''':<br />
mysql.so<br />
mysqli.so<br />
pdo_mysql.so<br />
Now [[Daemons#Restarting|restart]] httpd (Apache) and open [http://localhost http://localhost] in your browser. You should now be able to create a user account and follow the installation wizard.<br />
<br />
== Custom configurations ==<br />
<br />
=== Filesize limitations ===<br />
<br />
With the default configuration ownCloud only allows the upload of filesizes less than 2MB.<br />
This can be changed by changing the following line in {{ic|/etc/php/php.ini}} to your liking.<br />
<br />
'''As of version 4.0 this is no longer necessary! The maximum upload size is now set via the ownCloud gui'''<br />
upload_max_filesize = 2M<br />
<br />
As of version 4.5, upload limits are set in {{ic|/usr/share/webapps/owncloud/.htaccess}}. This won't work if [[LAMP#Using_php5_with_apache2-mpm-worker_and_mod_fcgid|PHP is set up to run as CGI]], so you need to change the limits in {{ic|/etc/php/php.ini}}. You also need to change open_basedir.<br />
{{bc|<nowiki><br />
upload_max_filesize = 512M<br />
post_max_size = 512M<br />
memory_limit = 512M<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/<br />
</nowiki>}}<br />
<br />
=== Running ownCloud in a subdirectory ===<br />
<br />
By including the default '''owncloud.conf''' in '''httpd.conf''', owncloud will take control of port 80 and your localhost domain. If you would like to have owncloud run in a subdirectory, then skip the 'Include /etc/httpd/conf/extra/owncloud.conf' line altogether and just use a symbolic link like so: <br />
# ln -s /usr/share/webapps/owncloud/ /srv/http/<br />
<br />
In that case, you'll also have to ensure /usr/share/webapps is in the open_basedir line of php.ini, and that per-directory .htaccess files are read by apache. <br />
<br />
Alternatively, you could follow the standard procedure, but comment out the VirtualHost part of the include file, and skip the symlink/basedir/htaccess part.<br />
<br />
== Filling ownCloud with data ==<br />
<br />
=== Small files ===<br />
<br />
==== WebDav ====<br />
<br />
Always use [[WebDAV]] or the web interface to add new files to your ownCloud. Otherwise they will not show up correctly, as they do not get indexed right.<br />
No further configuration is necessary to enable [[WebDAV]] uploads in ownCloud. <br />
<br />
Consider installing and enabling [[php-apc]] to speed up WebDAV.<br />
<br />
==== SABnzbd ====<br />
<br />
When using [[SABnzbd]], you might want to set<br />
folder_rename 0<br />
in your sabnzbd.ini file, because ownCloud will scan the files as soon as they get uploaded, preventing SABnzbd from removing UNPACKING prefixes etc.<br />
<br />
=== Big files ===<br />
<br />
WebDAV isn't suitable for big files, because it fills up all the RAM and CPU.<br />
<br />
With the current version, it looks like, there is no good way of copying huge amounts of data to your ownCloud.<br />
<br />
Here's a Workaround:<br />
<br />
Copy the files directly to your ownCloud and do a full re-scan of your database (you could use the [http://apps.owncloud.com/content/show.php?content=151948&forumpage=0&PHPSESSID=37b915160effcc0f37cc761ad2ab88be Re-scan filesystem] add-on for example).<br />
<br />
But beware that this will not work as easily in the future, when end-to-end encryption gets added to ownCloud (this is a planned feature).<br />
<br />
== Important notes ==<br />
<br />
* When using a subdomain (like cloud.example.net), make sure it is covered by your certificate. Otherwise, connection via the owncloud client or webdav might fail.<br />
<br />
* If you are planning on using OwnCloud's [http://owncloud.org/sync-clients/ sync-clients], make sure to have [[NTP]] installed and running on your OwnCloud server, otherwise the sync-clients will fail.<br />
<br />
* Add some [[LAMP#SSL|SSL encryption]] to your connection!<br />
<br />
* More Apps for ownCloud can be found [http://apps.owncloud.com/ here]<br />
<br />
* To install an new application, download the zip from the apps store, extract it into /srv/http/owncloud/apps/.<br />
Afterwards restart httpd:<br />
<br />
systemctl restart httpd<br />
<br />
log into your server go to the app sections you should see the new apps in there,<br />
<br />
== Nginx + uwsgi_php alternative ==<br />
<br />
You can avoid the use of Apache, and run owncloud in it's own process by using the [https://aur.archlinux.org/packages.php?ID=63798 wsgi_php] application server. uWSGI itself has a wealth of features to limit the resource use, and to harden the security of the application, and by being a separate process it can run under its own user.<br />
<br />
The nginx config is:<br />
{{bc|<nowiki><br />
#this is to avoid Request Entity Too Large error<br />
client_max_body_size 1000M;<br />
# deny access to some special files<br />
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {<br />
deny all;<br />
}<br />
# pass all .php or .php/path urls to uWSGI<br />
location ~ ^(.+\.php)(.*)$ {<br />
include uwsgi_params;<br />
uwsgi_modifier1 14;<br />
uwsgi_pass 127.0.0.1:3001;<br />
}<br />
# everything else goes to the filesystem,<br />
# but / will be mapped to index.php and run through uwsgi<br />
location / {<br />
root /usr/share/webapps/owncloud;<br />
index index.php;<br />
}<br />
</nowiki>}}<br />
The uWSGI /etc/uwsgi/owncloud.ini config file (run it with uwsgi_php --ini /etc/uwsgi/owncloud.ini):<br />
{{bc|<nowiki><br />
[uwsgi]<br />
socket = 127.0.0.1:3001<br />
master = true<br />
chdir = /srv/http/owncloud<br />
php-docroot = /usr/share/webapps/owncloud<br />
php-index = index.php<br />
<br />
# only allow these php files, I don't want to inadvertently run something else<br />
php-allowed-ext = /index.php<br />
php-allowed-ext = /public.php<br />
php-allowed-ext = /remote.php<br />
php-allowed-ext = /cron.php<br />
php-allowed-ext = /status.php<br />
php-allowed-ext = /settings/apps.php<br />
php-allowed-ext = /core/ajax/update.php<br />
php-allowed-ext = /core/ajax/share.php<br />
php-allowed-ext = /core/ajax/requesttoken.php<br />
php-allowed-ext = /core/ajax/translations.php<br />
php-allowed-ext = /search/ajax/search.php<br />
php-allowed-ext = /search/templates/part.results.php<br />
php-allowed-ext = /settings/admin.php<br />
php-allowed-ext = /settings/users.php<br />
php-allowed-ext = /settings/personal.php<br />
php-allowed-ext = /settings/help.php<br />
php-allowed-ext = /settings/ajax/getlog.php<br />
php-allowed-ext = /settings/ajax/setlanguage.php<br />
php-allowed-ext = /settings/ajax/setquota.php<br />
php-allowed-ext = /settings/ajax/userlist.php<br />
php-allowed-ext = /settings/ajax/createuser.php<br />
php-allowed-ext = /settings/ajax/removeuser.php<br />
php-allowed-ext = /settings/ajax/enableapp.php<br />
php-allowed-ext = /core/ajax/appconfig.php<br />
<br />
php-set = date.timezone=Europe/Skopje<br />
php-set = open_basedir=/srv/http/owncloud:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud<br />
<br />
processes = 10<br />
cheaper = 2<br />
cron = -1 -1 -1 -1 -1 /usr/bin/curl -H https://localhost/cron.php<br />
<br />
</nowiki>}}<br />
Finally, a simple systemd unit file to start the uwsgi instance can be (this is without using the emperor):<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=OwnCloud service via uWSGI-PHP<br />
<br />
[Service]<br />
User=http<br />
ExecStart=/usr/bin/uwsgi_php --ini /etc/uwsgi/owncloud.ini<br />
ExecReload=/bin/kill -HUP $MAINPID<br />
KillSignal=SIGQUIT<br />
Restart=always<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Sync Clients ==<br />
<br />
The offical clients can be found in this page : [http://owncloud.org/install/ Sync Clients]<br />
Also take notice that while the offical owncloud android app is a payed app on the play store, it is not a payed app on [https://f-droid.org/ F-Droid].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Self-signed certificate not accepted ===<br />
<br />
OwnCloud uses [[Wikipedia:cURL]] and [[Wikipedia:SabreDAV]] to check if [[WebDAV]] is enabled. If you use a SSL/TLS with a self-signed certificate, e.g. as shown in [[LAMP]] and access ownClouds admin panel, you will see the following error message:<br />
<br />
Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.<br />
<br />
In order to circumvent this problem a few solutions are available. One is to turn off the {{Ic|VERYFIPEER}}-parameter in cURL which is strongly discouraged as it will effectively render any encryption useless (see: https://github.com/owncloud/core/issues/1909#issuecomment-14107259). <br />
<br />
A better way is to trust your own certificate. Assuming that you followed the [[LAMP]]-tutorial, execute the following steps:<br />
<br />
Create local directory for non-distribution certificates and copy [[LAMP]]s certificate there. This will prevent {{Ic|ca-certificates}}-updates to overwrite it.<br />
<br />
$ mkdir -p /usr/local/share/ca-certificates<br />
$ cp /etc/httpd/conf/server.crt /usr/local/share/ca-certificates/''WWW.EXAMPLE.COM.crt''<br />
<br />
Add ''WWW.EXAMPLE.COM.crt'' to {{ic|/etc/ca-certificates.conf}}:<br />
<br />
''WWW.EXAMPLE.COM.crt''<br />
<br />
Now, regenerate your certificate store:<br />
<br />
$ update-ca-certificates<br />
<br />
Restart the httpd service to activate your certificate.<br />
<br />
=== Can't create data directory (/path/to/dir) ===<br />
<br />
Check your httpd conf file (like owncloud.conf). Add your data dir to <br />
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/path/to/dir/"<br />
<br />
Restart the httpd service to activate the change.<br />
<br />
=== CSync faild to find a specific file. ===<br />
<br />
Most probably a certificate issue, recreate it, and don't leave the common name empty or you will see the error again.<br />
<br />
openssl genrsa -out server.key 2048<br />
openssl req -new -key server.key -x509 -days 365 -out server.crt<br />
<br />
=== Seeing white page after login ===<br />
<br />
The cause is probably a new app that you installed, to fix that you can either use phpMyAdmin by editing the oc_appconfig table(in the case you got lucky and the table has edit option) or do it by hand with mysql:<br />
<br />
mysql -u root -p owncloud<br />
MariaDB [owncloud]> '''delete from''' oc_appconfig '''where''' appid='<nameOfExtension>' '''and''' configkey='enabled' and configvalue='yes'<br />
MariaDB [owncloud]> '''insert into''' oc_appconfig (appid,configkey,configvalue) '''values''' ('storage_charts','enabled','no');<br />
<br />
This should delete the relevant configuration from the table and add it again.</div>RevolverXDhttps://wiki.archlinux.org/index.php?title=Nextcloud&diff=271001Nextcloud2013-08-13T12:59:04Z<p>RevolverXD: </p>
<hr />
<div>[[Category:Web Server]]<br />
[[fr:Owncloud]]<br />
[[ja:Owncloud]]<br />
From [[Wikipedia:ownCloud|Wikipedia]]:<br />
: ''ownCloud is a software suite that provides a location-independent storage area for data (cloud storage).''<br />
<br />
== Installation ==<br />
<br />
{{AUR|owncloud}} is available in the [[AUR]].<br />
# First of all set up the [[LAMP]] stack. You will probably need to install the MDB2 pear package as well: {{ic|# pear install mdb2}}<br />
# Install the {{AUR|owncloud}} package as described in [[AUR#Installing_packages|AUR wiki page]].<br />
# Copy {{ic|/usr/share/doc/owncloud/examples/apache.conf_example}} to {{ic|/etc/httpd/conf/extra/owncloud.conf}} (if using owncloud-git)<br />
# Add the following lines into {{ic|/etc/httpd/conf/httpd.conf}} (php5 should have been configured during the LAMP stack setup):<br />
Include /etc/httpd/conf/extra/owncloud.conf<br />
LoadModule php5_module modules/libphp5.so<br />
Include conf/extra/php5_module.conf<br />
Uncomment extensions in {{ic|/etc/php/php.ini}}:<br />
gd.so<br />
intl.so<br />
openssl.so<br />
xmlrpc.so<br />
zip.so<br />
iconv.so<br />
Depending on which database backend you are going to use uncomment either one of the following extensions in {{ic|/etc/php/php.ini}}:<br />
sqlite.so<br />
sqlite3.so<br />
pdo_sqlite.so<br />
'''or''':<br />
mysql.so<br />
mysqli.so<br />
pdo_mysql.so<br />
Now [[Daemons#Restarting|restart]] httpd (Apache) and open [http://localhost http://localhost] in your browser. You should now be able to create a user account and follow the installation wizard.<br />
<br />
== Custom configurations ==<br />
<br />
=== Filesize limitations ===<br />
<br />
With the default configuration ownCloud only allows the upload of filesizes less than 2MB.<br />
This can be changed by changing the following line in {{ic|/etc/php/php.ini}} to your liking.<br />
<br />
'''As of version 4.0 this is no longer necessary! The maximum upload size is now set via the ownCloud gui'''<br />
upload_max_filesize = 2M<br />
<br />
As of version 4.5, upload limits are set in {{ic|/usr/share/webapps/owncloud/.htaccess}}. This won't work if [[LAMP#Using_php5_with_apache2-mpm-worker_and_mod_fcgid|PHP is set up to run as CGI]], so you need to change the limits in {{ic|/etc/php/php.ini}}. You also need to change open_basedir.<br />
{{bc|<nowiki><br />
upload_max_filesize = 512M<br />
post_max_size = 512M<br />
memory_limit = 512M<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/<br />
</nowiki>}}<br />
<br />
=== Running ownCloud in a subdirectory ===<br />
<br />
By including the default '''owncloud.conf''' in '''httpd.conf''', owncloud will take control of port 80 and your localhost domain. If you would like to have owncloud run in a subdirectory, then skip the 'Include /etc/httpd/conf/extra/owncloud.conf' line altogether and just use a symbolic link like so: <br />
# ln -s /usr/share/webapps/owncloud/ /srv/http/<br />
<br />
In that case, you'll also have to ensure /usr/share/webapps is in the open_basedir line of php.ini, and that per-directory .htaccess files are read by apache. <br />
<br />
Alternatively, you could follow the standard procedure, but comment out the VirtualHost part of the include file, and skip the symlink/basedir/htaccess part.<br />
<br />
== Filling ownCloud with data ==<br />
<br />
=== Small files ===<br />
<br />
==== WebDav ====<br />
<br />
Always use [[WebDAV]] or the web interface to add new files to your ownCloud. Otherwise they will not show up correctly, as they do not get indexed right.<br />
No further configuration is necessary to enable [[WebDAV]] uploads in ownCloud. <br />
<br />
Consider installing and enabling [[php-apc]] to speed up WebDAV.<br />
<br />
==== SABnzbd ====<br />
<br />
When using [[SABnzbd]], you might want to set<br />
folder_rename 0<br />
in your sabnzbd.ini file, because ownCloud will scan the files as soon as they get uploaded, preventing SABnzbd from removing UNPACKING prefixes etc.<br />
<br />
=== Big files ===<br />
<br />
WebDAV isn't suitable for big files, because it fills up all the RAM and CPU.<br />
<br />
With the current version, it looks like, there is no good way of copying huge amounts of data to your ownCloud.<br />
<br />
Here's a Workaround:<br />
<br />
Copy the files directly to your ownCloud and do a full re-scan of your database (you could use the [http://apps.owncloud.com/content/show.php?content=151948&forumpage=0&PHPSESSID=37b915160effcc0f37cc761ad2ab88be Re-scan filesystem] add-on for example).<br />
<br />
But beware that this will not work as easily in the future, when end-to-end encryption gets added to ownCloud (this is a planned feature).<br />
<br />
== Important notes ==<br />
<br />
* When using a subdomain (like cloud.example.net), make sure it is covered by your certificate. Otherwise, connection via the owncloud client or webdav might fail.<br />
<br />
* If you are planning on using OwnCloud's [http://owncloud.org/sync-clients/ sync-clients], make sure to have [[NTP]] installed and running on your OwnCloud server, otherwise the sync-clients will fail.<br />
<br />
* Add some [[LAMP#SSL|SSL encryption]] to your connection!<br />
<br />
* More Apps for ownCloud can be found [http://apps.owncloud.com/ here]<br />
<br />
* To install an new application, download the zip from the apps store, extract it into /srv/http/owncloud/apps/.<br />
Afterwards restart httpd:<br />
<br />
systemctl restart httpd<br />
<br />
log into your server go to the app sections you should see the new apps in there,<br />
<br />
== Nginx + uwsgi_php alternative ==<br />
<br />
You can avoid the use of Apache, and run owncloud in it's own process by using the [https://aur.archlinux.org/packages.php?ID=63798 wsgi_php] application server. uWSGI itself has a wealth of features to limit the resource use, and to harden the security of the application, and by being a separate process it can run under its own user.<br />
<br />
The nginx config is:<br />
{{bc|<nowiki><br />
#this is to avoid Request Entity Too Large error<br />
client_max_body_size 1000M;<br />
# deny access to some special files<br />
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {<br />
deny all;<br />
}<br />
# pass all .php or .php/path urls to uWSGI<br />
location ~ ^(.+\.php)(.*)$ {<br />
include uwsgi_params;<br />
uwsgi_modifier1 14;<br />
uwsgi_pass 127.0.0.1:3001;<br />
}<br />
# everything else goes to the filesystem,<br />
# but / will be mapped to index.php and run through uwsgi<br />
location / {<br />
root /usr/share/webapps/owncloud;<br />
index index.php;<br />
}<br />
</nowiki>}}<br />
The uWSGI /etc/uwsgi/owncloud.ini config file (run it with uwsgi_php --ini /etc/uwsgi/owncloud.ini):<br />
{{bc|<nowiki><br />
[uwsgi]<br />
socket = 127.0.0.1:3001<br />
master = true<br />
chdir = /srv/http/owncloud<br />
php-docroot = /usr/share/webapps/owncloud<br />
php-index = index.php<br />
<br />
# only allow these php files, I don't want to inadvertently run something else<br />
php-allowed-ext = /index.php<br />
php-allowed-ext = /public.php<br />
php-allowed-ext = /remote.php<br />
php-allowed-ext = /cron.php<br />
php-allowed-ext = /status.php<br />
php-allowed-ext = /settings/apps.php<br />
php-allowed-ext = /core/ajax/update.php<br />
php-allowed-ext = /core/ajax/share.php<br />
php-allowed-ext = /core/ajax/requesttoken.php<br />
php-allowed-ext = /core/ajax/translations.php<br />
php-allowed-ext = /search/ajax/search.php<br />
php-allowed-ext = /search/templates/part.results.php<br />
php-allowed-ext = /settings/admin.php<br />
php-allowed-ext = /settings/users.php<br />
php-allowed-ext = /settings/personal.php<br />
php-allowed-ext = /settings/help.php<br />
php-allowed-ext = /settings/ajax/getlog.php<br />
php-allowed-ext = /settings/ajax/setlanguage.php<br />
php-allowed-ext = /settings/ajax/setquota.php<br />
php-allowed-ext = /settings/ajax/userlist.php<br />
php-allowed-ext = /settings/ajax/createuser.php<br />
php-allowed-ext = /settings/ajax/removeuser.php<br />
php-allowed-ext = /settings/ajax/enableapp.php<br />
php-allowed-ext = /core/ajax/appconfig.php<br />
<br />
php-set = date.timezone=Europe/Skopje<br />
php-set = open_basedir=/srv/http/owncloud:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud<br />
<br />
processes = 10<br />
cheaper = 2<br />
cron = -1 -1 -1 -1 -1 /usr/bin/curl -H https://localhost/cron.php<br />
<br />
</nowiki>}}<br />
Finally, a simple systemd unit file to start the uwsgi instance can be (this is without using the emperor):<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=OwnCloud service via uWSGI-PHP<br />
<br />
[Service]<br />
User=http<br />
ExecStart=/usr/bin/uwsgi_php --ini /etc/uwsgi/owncloud.ini<br />
ExecReload=/bin/kill -HUP $MAINPID<br />
KillSignal=SIGQUIT<br />
Restart=always<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Sync Clients ==<br />
<br />
The offical clients can be found in this page : [http://owncloud.org/install/ Sync Clients]<br />
Also take notice that while the offical owncloud android app is a payed app on the play store, it is not a payed app on [https://f-droid.org/ F-Droid].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Self-signed certificate not accepted ===<br />
<br />
OwnCloud uses [[Wikipedia:cURL]] and [[Wikipedia:SabreDAV]] to check if [[WebDAV]] is enabled. If you use a SSL/TLS with a self-signed certificate, e.g. as shown in [[LAMP]] and access ownClouds admin panel, you will see the following error message:<br />
<br />
Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.<br />
<br />
In order to circumvent this problem a few solutions are available. One is to turn off the {{Ic|VERYFIPEER}}-parameter in cURL which is strongly discouraged as it will effectively render any encryption useless (see: https://github.com/owncloud/core/issues/1909#issuecomment-14107259). <br />
<br />
A better way is to trust your own certificate. Assuming that you followed the [[LAMP]]-tutorial, execute the following steps:<br />
<br />
Create local directory for non-distribution certificates and copy [[LAMP]]s certificate there. This will prevent {{Ic|ca-certificates}}-updates to overwrite it.<br />
<br />
$ mkdir -p /usr/local/share/ca-certificates<br />
$ cp /etc/httpd/conf/server.crt /usr/local/share/ca-certificates/''WWW.EXAMPLE.COM.crt''<br />
<br />
Add ''WWW.EXAMPLE.COM.crt'' to {{ic|/etc/ca-certificates.conf}}:<br />
<br />
''WWW.EXAMPLE.COM.crt''<br />
<br />
Now, regenerate your certificate store:<br />
<br />
$ update-ca-certificates<br />
<br />
Restart the httpd service to activate your certificate.<br />
<br />
=== Can't create data directory (/path/to/dir) ===<br />
<br />
Check your httpd conf file (like owncloud.conf). Add your data dir to <br />
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/path/to/dir/"<br />
<br />
Restart the httpd service to activate the change.<br />
<br />
=== CSync faild to find a specific file. ===<br />
<br />
Most probably a certificate issue, recreate it, and don't leave the common name empty or you will se the error again.<br />
<br />
openssl genrsa -out server.key 2048<br />
openssl req -new -key server.key -x509 -days 365 -out server.crt<br />
<br />
=== Seeing white page after login ===<br />
<br />
The cause is probably a new app that you installed, to fix that you can either use phpMyAdmin by editing the oc_appconfig table(in the case you got lucky and the table has edit option) or do it by hand with mysql:<br />
<br />
mysql -u root -p owncloud<br />
MariaDB [owncloud]> '''delete from''' oc_appconfig '''where''' appid='<nameOfExtension>' '''and''' configkey='enabled' and configvalue='yes'<br />
MariaDB [owncloud]> '''insert into''' oc_appconfig (appid,configkey,configvalue) '''values''' ('storage_charts','enabled','no');<br />
<br />
This should delete the relevant configuration from the table and add it again.</div>RevolverXD