Solved

linux permission

Posted on 2011-02-22
6
420 Views
Last Modified: 2012-05-11
hi

i have installed an ftp server on my linux debian machine , i can connect to it remotely and i can upload/download  files with success

when i open the the same ftp folder in my windows machine i have access to the folder but when i open the files i get "access denied"

the strange thing is that if i go into my linux machine and put a file in that folder i can open it from windows but if i do the same operation from the ftp i get "access denied"  

maybe its a something i didn't configured right in the vsftp.conf file....
0
Comment
Question by:ywainberg
  • 3
  • 3
6 Comments
 
LVL 11

Expert Comment

by:Pieter Jordaan
ID: 34950652
Hi

You say that you can open the file from windows? Are you using an ftp client to connect to it?
It sounds like you are using samba and ftp.

Permissions on unix depend on the user account used, and the umask setting for it.
The user account used in your vsftp config must have full write permissions on that folder.

look at the umask settings here: http://vsftpd.beasts.org/vsftpd_conf.html

a umask of 002 will give all files created by that user, rwxrwxr-x permissions. so other users not in that group can only read it.

If you are using samba and vsftpd, make sure both use the same user account to access the file.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 34950777
can you be more specific ?
0
 
LVL 11

Expert Comment

by:Pieter Jordaan
ID: 34951098
You didn't answer my question?

Are you using Samba to access the file from windows?
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 2

Author Comment

by:ywainberg
ID: 34951115
yes
0
 
LVL 11

Accepted Solution

by:
Pieter Jordaan earned 250 total points
ID: 34951176
Just configure Samba to use the same user account as vsftp.

In your smb.conf file, add the following under the file share that shares the file.
There should be a heading like [Share Name]

        force user = yourftpuser
        force group = yourftpgroup

Then restart samba.

I can not really help you until you give me more information.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 34951285
it worked like a charm

thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Mint 18 31 77
Redirect on SBS hosted web not working from linux based browsers 3 73
Delete email that have a topic like  Cpanel 3 69
php ssh2_scp_send 1 49
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now