My journey to successfully game under Linux (and overcome Microsoft's Stranglehold)

Page 8 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
Nothing.. same thing Windows cannot access

If you open the remote folder, and right click on a share, choose "Map Network Drive", you will receive the following menu. Click on connect using different credentials, enter the samba username & password. does that successfully map the share to a drive letter?

1753907215720.png
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
If you open the remote folder, and right click on a share, choose "Map Network Drive", you will receive the following menu. Click on connect using different credentials, enter the samba username & password. does that successfully map the share to a drive letter?

View attachment 127954

Attempting to connect to \\192.168.1.235\Movies

Windows cannot access \\192.168.1.235\Movies
Check the spelling of the name. otherwise, there might be a problem with your network. To try to identify and resove network problems, click Diagnose.
 

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
Attempting to connect to \\192.168.1.235\Movies

Windows cannot access \\192.168.1.235\Movies
Check the spelling of the name. otherwise, there might be a problem with your network. To try to identify and resove network problems, click Diagnose.
Ok, disable windows firewall, and try again. Take your time to ensure you're disabling the firewall for the profile your network connection is assigned under.
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
Here you go:

Screenshot_20250730_164851.png


I've also been looking at something else..


Which says look at this:


The person who solved it says try a command that lists things which in my case would be:

Code:
ls -l -d -Z /{,mnt/{,Movies/{,Videos/}}}

And the output is:

Screenshot_20250730_165032.png


He also says put in a certain command and that fixes it..

Screenshot_20250730_165949.png
 
Last edited:

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
Here you go:


I've also been looking at something else..


Which says look at this:


The person who solved it says try a command that lists things which in my case would be:
Reviewing the links, looks like it mainly mount point confirmation and permissions verification.
Code:
ls -l -d -Z /{,mnt/{,Movies/{,Videos/}}}

And the output is:
for this one, on my smb shares, root is owner and group of the top level /mnt directory

inside, my folders are my user as the owner, and root as the group

one of the posts said this, but it's about MacOS

1753909404350.png

Recommended: comment out anything you don't need in the smb.conf file
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
Reviewing the links, looks like it mainly mount point confirmation and permissions verification.

for this one, on my smb shares, root is owner and group of the top level /mnt directory

inside, my folders are my user as the owner, and root as the group

Right.. but would a similarly placed command work in my case??

Think it should work out to:

sudo chcon -t samba_share_t /mnt/Movies

Or do I change the mount file of the main ultramarine drive away from root to user? (similar to what I did with my storage drive earlier in the day but I didn't want to mess with the main drive)
 

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
Right.. but would a similarly placed command work in my case??

Think it should work out to:

sudo chcon -t samba_share_t /mnt/Movies

um, that appears to be a connection mapping for samba. change the variables to match your own (if you choose to try this).

You may want to open a thread on the fedora forum, maybe the peeps over there are more familiar with this. I run mainly debian (Ubuntu). Samba config was a little cumbersome cli oriented, but that's user malfunction :) My smb.conf looks quite a bit different than yours as well, but much of it is commented out.

Again, here's a sample of mine for reference, you can always go thru the setup and make sure you have a valid user configured, valid mappings, etc...add the permissions at the end of yours to see if that helps.

Code:
[share1]
   comment = samba share for media backup
   path = /mnt/data
   public = no
   read only = no
   writable = yes
   printable = no
   browsable = yes
   create mask = 0755
   directory mask = 0755
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
um, that appears to be a connection mapping for samba. change the variables to match your own (if you choose to try this).

You may want to open a thread on the fedora forum, maybe the peeps over there are more familiar with this. I run mainly debian (Ubuntu). Samba config was a little cumbersome cli oriented, but that's user malfunction :) My smb.conf looks quite a bit different than yours as well, but much of it is commented out.

Again, here's a sample of mine for reference, you can always go thru the setup and make sure you have a valid user configured, valid mappings, etc...add the permissions at the end of yours to see if that helps.

Code:
[share1]
   comment = samba share for media backup
   path = /mnt/data
   public = no
   read only = no
   writable = yes
   printable = no
   browsable = yes
   create mask = 0755
   directory mask = 0755

Let me try editing the samba file.. I'm afraid to do anything with mounts as that's what wrecked my system before.. and I was unable to recover.

Simplifying the samba file makes sense..

And I noticed you don't have a allowed user.. maybe that creates problems??

Anyways trying! *fingers crossed!
 

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
chcon AI results:
Code:
The sudo chcon command is used to change the SELinux security context of files and directories. It allows users to modify the context, which influences how files are accessed and managed within the system. Here are some key points and examples related to the use of sudo chcon:

[LIST]
[*]To change the SELinux context of a file or directory, you can use the following syntax:
sudo chcon [options] context file

For example, to change the context of a file named important_file.txt to system_u:object_r:httpd_sys_content_t, you would run:
sudo chcon system_u:object_r:httpd_sys_content_t important_file.txt


[*]When using chcon recursively (-R), you can control how symbolic links are handled:
[LIST]
[*]Traverse all symbolic links: sudo chcon -R -L system_u:object_r:httpd_sys_content_t /var/www
[*]Traverse only symbolic links to directories: sudo chcon -R -H system_u:object_r:httpd_sys_content_t /var/www
[*]Skip all symbolic links: sudo chcon -R -P system_u:object_r:httpd_sys_content_t /var/www 
[/LIST]
[*]You can also apply the context from a reference file to multiple files:
sudo chcon --reference=reference_log_file *.log


[*]It is important to note that changes made with chcon are temporary. They can be reverted by using the restorecon command, which restores the default SELinux contexts for files and directories.
[*]For more granular control over file contexts, you might consider using semanage fcontext, which allows you to define or modify mappings between file paths and security contexts within the SELinux policy.
[*]The chcon command is a powerful tool for managing SELinux security contexts, but it should be used with care and a good understanding of SELinux policies to maintain the security and integrity of your Linux systems.
[/LIST]
 

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
Let me try editing the samba file.. I'm afraid to do anything with mounts as that's what wrecked my system before.. and I was unable to recover.

Simplifying the samba file makes sense..

And I noticed you don't have a allowed user.. maybe that creates problems??

Anyways trying! *fingers crossed!

I'm not sure how you wrecked your system with mounts, maybe or maybe not relevant. don't mess with your OS mounts :p
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
I'm not sure how you wrecked your system with mounts, maybe or maybe not relevant. don't mess with your OS mounts :p

Remember the mounts were not writeable.. I experimented with them but I experimented with ALL of them.

After that I did it slowly like try on one of the smaller drives rather than main ones and leave the operating system drive alone.

That's how the fstab looks vastly different between them now..

Screenshot_20250730_171701.png

Basically the top ones are how I started with and the bottom ones are version 5.0 or 6.0 of the revision of how I fixed them to be able to mount at boot and still not become read-only.
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
Ok I simplified the samba.conf

no more allowed users got rid of the folder named like the username but still..

Windows cannot access hmmm.

I can see it just fine though
 

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
Remember the mounts were not writeable.. I experimented with them but I experimented with ALL of them.

After that I did it slowly like try on one of the smaller drives rather than main ones and leave the operating system drive alone.

That's how the fstab looks vastly different between them now..

View attachment 127960

Basically the top ones are how I started with and the bottom ones are version 5.0 or 6.0 of the revision of how I fixed them to be able to mount at boot and still not become read-only.
Here's the fstab mount for the /mnt/data directory in the samba share snip I posted:

Code:
# /mnt/data was on /dev/sdb1 during curtin installation
/dev/disk/by-uuid/fe4520b7-bd6a-4c4e-b8a9-4444b03b461b /mnt/data ext4 defaults 0 1

use lsblk to get uuid.
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
Here's the fstab mount for the /mnt/data directory in the samba share snip I posted:

Code:
# /mnt/data was on /dev/sdb1 during curtin installation
/dev/disk/by-uuid/fe4520b7-bd6a-4c4e-b8a9-4444b03b461b /mnt/data ext4 defaults 0 1

use lsblk to get uuid.

I'm curious.. your /home drive partition.. is it's ownership by root or group?

Mine seems to be root.

I'm wondering if that's creating a problem.
 

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
I'm curious.. your /home drive partition.. is it's ownership by root or group?

Mine seems to be root.

I'm wondering if that's creating a problem.

should not, nothing i share is mounted under /home.
 

Indus

Lifer
May 11, 2002
15,964
11,108
136
should not, nothing i share is mounted under /home.

Well mine is mounted now under /mnt which is under / ??

it seems the whole drive is under root for me..

Screenshot_20250730_172541.png

Edit: I meant to do that for /mnt but I just checked.. it's set to user root and owner root.

Maybe we need to change it to user??
 

ch33zw1z

Lifer
Nov 4, 2004
39,749
20,323
146
Well mine is mounted now under /mnt which is under / ??

it seems the whole drive is under root for me..

View attachment 127961

Edit: I meant to do that for /mnt but I just checked.. it's set to user root and owner root.

Maybe we need to change it to user??

Mine is not like that. /mnt is root root, /data is user root. samba share is working ok.

most of the folders should belong to root afaik.
 
Jul 27, 2020
28,107
19,174
146
I don't know about anyone else but a casual user coming into this thread would be like, Linux? NOPE!

We have a user who is eager to learn and an experienced user helping out and yet after several pages, simple network sharing isn't working as it should. Linux is unpolished as heck. Just my two cents.

(funny if right after this post, Indus has a eureka moment :D )
 

manly

Lifer
Jan 25, 2000
13,258
4,033
136
There's obviously a lot of moving parts here. It's easy to get lost in the weeds of unfamiliarity.

As a random starter question, what does chmod 775 do?

At this point, the first troubleshooting step I would do is to use smbclient to check that the file share is actually "working," over the loopback interface.


Once that is successful, I would continue to troubleshooting over the network. As suggested, I would start by stopping the Fedora firewall service.


No I don't have that option or anything like that.

But you gave me an idea.. I should change ownership of folder from root to user.

So I tried terminal commands of

Code:
sudo chown -R jyaku:jyaku "/mnt/Movies"
but as you can see.. operation not permitted
Can you explain to us why you would use the -R option?

Did you say that this is an exFAT filesystem? FAT doesn't support Linux permissions on a per-file basis if I recall correctly. That's why the operation is not permitted.
In other words, it's the initial mount options (from fstab) that are meaningful.

Good find on the SELinux context issue; that might be the issue. At a glance, this is a good write-up:



Why is there a shared folder with your user name there? Why didn't you comment out the old folder share [SharedStuff]? Is there more shared in the samba .conf?
That's just the "homes" share, probably best to disable it if it's not needed. (Although it could be helpful to get this share working first.)
 
Last edited:
  • Like
Reactions: Indus and ch33zw1z