• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

I can move files from Windows drives to Linux drives,

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
I've got this drive in Linux called 2C. 2C contains the folders Torrents and Movies.

Using Samba and Windows Explorer, I want to move files from Torrents to Movies, but whenever I do this I get an access is denied error.

This is strange because I can move files from my Windows machine into both Torrents and Movies, their ownership is nobody, but I can't move files between the two?
 
their ownership is nobody,

Do you mean the real user nobody because one usually exits on a Linux system or do you mean that there is no owner, because the latter is impossible.

I did a chmod 0777 on 2C. Does this give me delete rights?

It'll give you delete rights to the 2C directory but not necessarily any other directories on the volume. But never use mode 777 for any files.
 
Originally posted by: Nothinman
their ownership is nobody,

Do you mean the real user nobody because one usually exits on a Linux system or do you mean that there is no owner, because the latter is impossible.

I did a chmod 0777 on 2C. Does this give me delete rights?

It'll give you delete rights to the 2C directory but not necessarily any other directories on the volume. But never use mode 777 for any files.

I mean the real user nobody.

The entire harddisk is mounted on /mnt/2C

/mnt was given the chmod 0777 thingy.
 
I mean the real user nobody.

Why? Why wouldn't you give ownership to the user that you're logging in under?

/mnt was given the chmod 0777 thingy.

That's even less relevant, that'll give anyone permission to add and delete files from /mnt but nothing under it.
 
Originally posted by: Nothinman
I mean the real user nobody.

Why? Why wouldn't you give ownership to the user that you're logging in under?

/mnt was given the chmod 0777 thingy.

That's even less relevant, that'll give anyone permission to add and delete files from /mnt but nothing under it.

I'm not logging in under anyone. I'm accessing these shares via Windows Explorer, and I was told to set the ownership of /mnt and the shares in /mnt to nobody:nobody. Before, when it was set as root, I couldn't copy files to these shares.

So you're saying that chmod 0777 /mnt won't give add and delete privileges to folders under /mnt, like /mnt/2D, /mnt/2C, /mnt/2C/Torrents, /mnt/Photo1/Temp/Arches1/develops/finished, etc? But it does... I'm adding and deleting files from these places from my Windows box. My only problem is that I can't move around files within a specific share, like I can't move a file from /mnt/2C/torrents to /mnt/2C/movies
 
I'm not logging in under anyone.

So you setup anonymous shares? It would have been a lot simpler to just put an account on the server using the same username/password that you have on the Windows box.

and I was told to set the ownership of /mnt and the shares in /mnt to nobody:nobody. Before, when it was set as root, I couldn't copy files to these shares.

Well setting the ownership of the shares themselves to your user isn't a bad idea, but touching /mnt make no sense.

So you're saying that chmod 0777 /mnt won't give add and delete privileges to folders under /mnt, like /mnt/2D, /mnt/2C, /mnt/2C/Torrents, /mnt/Photo1/Temp/Arches1/develops/finished, etc?

Right, every file has it's own set of permissions and changing them on one won't affect any others.
 
Originally posted by: Nothinman

So you're saying that chmod 0777 /mnt won't give add and delete privileges to folders under /mnt, like /mnt/2D, /mnt/2C, /mnt/2C/Torrents, /mnt/Photo1/Temp/Arches1/develops/finished, etc?

Right, every file has it's own set of permissions and changing them on one won't affect any others.

How do I set every single folder to have the same full permissions? There's a million different folders under /mnt. Logic dictates I should not have to do chmod 0777 [folder] x a gazillion times.
 
Type man chmod in a shell. I assure you the answer is in there. If you don't read it for yourself, you won't really learn.
 
How do I set every single folder to have the same full permissions? There's a million different folders under /mnt. Logic dictates I should not have to do chmod 0777 [folder] x a gazillion times.

chmod has a recusion switch, but you don't want to do that. 777 permissions is an extremely bad idea, you need setup your Samba server to do proper authentication and then give yourself ownership of the files.
 
The reason why you can do it under Windows could be because Windows is not aware of the permissions system used in Linux. I access my Ubuntu drive under Windows XP using an ext2 driver, but that does not take permissions into account.

If you really wanted to change the permissions of every file under a certain directory, you should be able to use a wildcard (*). For example, you would do something like "chmod 766 -r /mnt/2C/*". Check the manual pages for the correct syntax, as I may not have it quite right. Also, using 766 will give root full permissions and everyone else read/write access (I think). As others have said this probably isn't the best idea, but it's your computer and I won't stop you.
 
The reason why you can do it under Windows could be because Windows is not aware of the permissions system used in Linux. I access my Ubuntu drive under Windows XP using an ext2 driver, but that does not take permissions into account.

That's completely irrelevant, when accessing the drive via the network (Samba in this case) it's still the local system that enforces the security.
 
user needs to be added to the correct group to have full control of the files.

No, you need to be the owner to have full control. But all full control means is the ability to change the permissions on the file, to read and write you just need read and write permissions.
 
Originally posted by: Nothinman
How do I set every single folder to have the same full permissions? There's a million different folders under /mnt. Logic dictates I should not have to do chmod 0777 [folder] x a gazillion times.

chmod has a recusion switch, but you don't want to do that. 777 permissions is an extremely bad idea, you need setup your Samba server to do proper authentication and then give yourself ownership of the files.

777 means full permissions for all users of the box. It does not mean that random people on the Internet can change your files. 777 is a bad idea if you are on a shared box and you don't want others disturbing your files, on a personal box, it's less of a concern. anyways to recursively apply chmod permissions the syntax is as follows: chmod -R <permissions level> <Top directory that you would like to apply permissions to>
 
It gives any process the ability to change those files, things you might not at first consider like your web server or your mail server or anything else running on the box that you forgot about.
 
Back
Top