LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-17-2015, 05:45 PM   #1
wewtaco
LQ Newbie
 
Registered: Jul 2015
Posts: 1

Rep: Reputation: Disabled
Permissions not setting correctly when transferring via Samba


Hi, I have a raspberry pi running on debian set up as a file server and seedbox, with Samba sharing my ext4-formatted external hard drive on my network. I recently re-formatted the hard drive from ExFAT to Ext4, and now I'm having a problem with file permissions when I transfer over from my Mac to my RPi from my file share. Every new file I transfer over looks like this when I use ls -l:

-rw-r--r-- 1 pi pi

the owner and group are correct, but I want the permission to be

rwxrwsr-x pi pi

I can change the file to the correct permissions, using chmod, but every time I move over a new file, the new file has these very restrictive permissions. Is there any way I can make it so it defaults to different permissions? I'd like it to automatically be 775.
 
Old 07-17-2015, 06:08 PM   #2
howzer
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Rep: Reputation: Disabled
If you're using rsync, you should be able to preserve the permissions of the original file(s) with the -P option.
 
Old 07-17-2015, 11:51 PM   #3
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Quote:
Originally Posted by wewtaco View Post
Hi, I have a raspberry pi running on debian set up as a file server and seedbox, with Samba sharing my ext4-formatted external hard drive on my network. I recently re-formatted the hard drive from ExFAT to Ext4, and now I'm having a problem with file permissions when I transfer over from my Mac to my RPi from my file share. Every new file I transfer over looks like this when I use ls -l:
What program are you using to transfer the files?
 
Old 07-18-2015, 02:09 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by wewtaco View Post
Hi, I have a raspberry pi running on debian set up as a file server and seedbox, with Samba sharing my ext4-formatted external hard drive on my network. I recently re-formatted the hard drive from ExFAT to Ext4, and now I'm having a problem with file permissions when I transfer over from my Mac to my RPi from my file share. Every new file I transfer over looks like this when I use ls -l:

-rw-r--r-- 1 pi pi

the owner and group are correct, but I want the permission to be

rwxrwsr-x pi pi

I can change the file to the correct permissions, using chmod, but every time I move over a new file, the new file has these very restrictive permissions. Is there any way I can make it so it defaults to different permissions? I'd like it to automatically be 775.
I only have superficial knowledge of this, but you should be able to configure this in /etc/samba/smb.conf. Go to the samba.org site and find documentation about default file permissions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Samba permissions not working correctly PastulioLive Linux - Server 2 12-03-2014 09:36 AM
Setting file permissions gvfs-mount samba share? ask Linux - General 1 01-04-2012 10:51 AM
[SOLVED] Problem setting up Samba server on Ubuntu - permissions?! allpwrfulroot Linux - Server 3 05-30-2010 11:02 PM
setting permissions for samba share eagle63 Linux - Newbie 2 12-23-2005 09:53 PM
I need help setting samba share permissions. trilect Linux - Software 10 08-24-2004 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration