File sharing greyed-out in Gnome

Hi, I was going to try to use file sharing via the local network in my Fedora 39 Gnome, but the respective option seems disabled.

All I can do is turn on network password protection, but other switches are grey-ed out.

The computer is connected to a local wi-fi router network.



Can you enable it by toggling the switch?

No, it is light gray and untogglable.

systemctl status httpd.service
$ systemctl status httpd.service

○ httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: d>
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
             /etc/systemd/system/httpd.service.d
             └─php-fpm.conf
     Active: inactive (dead)
       Docs: man:httpd.service(8)
lines 1-8/8 (END)

“Dead” does not sound promising.

Dead sounds worse than inactive.

Let’s try to start the service and if that helps we can enable it (the latter makes it start all the time when your computer boots)

systemctl start httpd.service

I’ve done $ systemctl start httpd.service, but the switch is still greyed-out. (Also, I updated to Fedora 40 yesterday, but to no avail.)

Could this have to do with the wifi-router settings? It’s not mine but I could ask for the access password.

After starting the service, what does above status command return now?

Use

systemctl enable httpd.service

to always start the service on boot

You are connected to the (W)LAN, right?

I am pretty sure no further config in the router is required, WebDAV uses https, so if your machine is able to surf the internet, you are all set.

One more thing that comes into my mind… do you even have a ~/Public directory?

I’ve entered the lines below and rebooted - but to no avail.

$ systemctl start httpd.service
$ systemctl enable httpd.service
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.

Yes, I have a ~/Public folder:

I am connected to a wifi network, is there a difference?

This problem was mentioned two years ago: Sharing -> File Sharing: switch grayed out

Same same. You are connected right?

nmcli connection show

I saw this post but it never went anywhere. I have honestly no great idea how to diagnose this and I am digging in the dark.

Did you check systemctl status httpd.service after starting the service?

What are the permission and SELinux context on ~/Public?

ls -laZ ~/Public

If it was my system I would also play around with firewall und SELinux:

sudo firewall-cmd --list-all
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload

To check if SELinux is blocking anything related to file sharing:

sudo ausearch -m AVC

If you find that SELinux is denying permissions , try setting permissive mode temporarily:

sudo setenforce 0

Check system logs to find more information:

sudo journalctl -xe

One more thing, I quickly went through my logs and I found a systemd unit I wasn’t aware of…

Starting gnome-user-share-webdav.service - gnome-user-share WebDAV server...
Started gnome-user-share-webdav.service - gnome-user-share WebDAV server.
Stopping gnome-user-share-webdav.service - gnome-user-share WebDAV server..

So how about

systemctl start gnome-user-share-webdav.service
systemctl status gnome-user-share-webdav.service
$ nmcli connection show
NAME                   UUID                                  TYPE      DEVICE  >
TOTOLINK_A3002R        158c97bc-d026-47db-b41f-5205f8e9f73d  wifi      wlp3s0  >
lo                     99885543-e80c-4633-85d2-61e92335d483  loopback  lo      >
outline-tun0           c17f5323-9823-40b2-aa3b-4aa3581182af  tun       outline-

[the other lines are grey]

Could this have to do with VPN? The guy who started the other topic was Chinese. I have Nekoray installed on my OS, although not running right now.

$ systemctl start httpd.service
$ systemctl status httpd.service
● httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
             /etc/systemd/system/httpd.service.d
             └─php-fpm.conf
     Active: active (running) since Fri 2024-09-20 17:51:43 MSK; 21s ago
       Docs: man:httpd.service(8)
   Main PID: 10343 (httpd)
     Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec:   0 B/sec"
      Tasks: 177 (limit: 9324)
     Memory: 19.7M (peak: 20.3M)
        CPU: 244ms
     CGroup: /system.slice/httpd.service
             ├─10343 /usr/sbin/httpd -DFOREGROUND
             ├─10362 /usr/sbin/httpd -DFOREGROUND
             ├─10364 /usr/sbin/httpd -DFOREGROUND
             ├─10368 /usr/sbin/httpd -DFOREGROUND
             └─10369 /usr/sbin/httpd -DFOREGROUND

Sep 20 17:51:42 x270 systemd[1]: Starting httpd.service - The Apache HTTP Server...
Sep 20 17:51:42 x270 (httpd)[10343]: httpd.service: Referenced but unset environment variable evaluates to an empty string: OPTIONS
Sep 20 17:51:42 x270 httpd[10343]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::59ed:596c:d4b0:2940%wlp3s0. Set t>
Sep 20 17:51:43 x270 systemd[1]: Started httpd.service - The Apache HTTP Server.
Sep 20 17:51:43 x270 httpd[10343]: Server configured, listening on: port 80
$ ls -laZ ~/Public
total 0
drwxr-xr-x. 1 uuser uuser unconfined_u:object_r:user_home_t:s0       0 Apr 14 01:45 .
drwx------. 1 uuser uuser unconfined_u:object_r:user_home_dir_t:s0 544 Sep 18 10:05 ..
$ sudo firewall-cmd --list-all
FedoraWorkstation (default, active)
  target: default
  ingress-priority: 0
  egress-priority: 0
  icmp-block-inversion: no
  interfaces: wlp3s0
  sources: 
  services: dhcpv6-client mdns samba-client ssh
  ports: 1025-65535/udp 1025-65535/tcp
  protocols: 
  forward: yes
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules:

sudo ausearch -m AVC listed quite many lines, but they all are old. The latest one is several days old, I did not try to use file sharing at that time.

Could the lines below be the key to the problem? The service gnome-user-share-webdav.service seems to be normally installed by default.

$ systemctl start gnome-user-share-webdav.service
Failed to start gnome-user-share-webdav.service: Unit gnome-user-share-webdav.service not found.

P. S. The router’s WAN settings:

I don’t know what has happened but - it was likely after one of the recent updates - but sharing functionality now works.

Thank you to everybody who has helped!