# pure-ftpd... symbolic links: No such file or directory

## fmeeusen

In brief: ftp user's directories are under /home/... A separate mounted drive has a directory called "sMedia" with sharable files. I create a symbolic link in the user's home directory to give them access to the shared folder. In the user's ftp program, the link shows up, but when they try to enter the directory, it never resolves to the shared folder. They receive  the error message:

```
550 Can't open sMedia: No such file or directory.
```

Debug log in pure-ftpd says basically the same:

```
Jul  6 23:52:55 [pure-ftpd] (chris@number1) [DEBUG] Command [retr] [sMedia]

Jul  6 23:52:55 [pure-ftpd] (chris@number1) [ERROR] Can't open sMedia: No such file or directory
```

As I understand it, the emerged version of pure-ftpd is compiled with --with-virtualchroot, so symbolic links should be followed. A friend has a very similar configuration and has no problem. We've compared config files, and they're identical. This very server I am having trouble with, at one time, had this same problem. I resolved it but do not remember how. It wound up being something very stupid and simple (like a missing "/" in a config file, a wrong dns setting, etc... something not pure-ftpd related as far as I can recall, but time may have warped my memory, and unfortunately I did not document it). I have even chown -R ftpuser:ftpgroup to sMedia.

Here is my user's profile:

```
Login              : chris

Password           : $1$PdaBlpr0$XI.S9xRYFrSC1tDg2x1LF0

UID                : 1000 (ftpuser)

GID                : 407 (ftpgroup)

Directory          : /home/chris/./

Full name          : 

Download bandwidth : 0 Kb (unlimited)

Upload   bandwidth : 0 Kb (unlimited)

Max files          : 0 (unlimited)

Max size           : 0 Mb (unlimited)

Ratio              : 0:0 (unlimited:unlimited)

Allowed local  IPs : 

Denied  local  IPs : 

Allowed client IPs : 

Denied  client IPs : 

Time restrictions  : 0000-0000 (unlimited)
```

Here is my config file, if this is any help:

```

##Comment variables out to disable its features, or change the values in it... ##

## This variable must be uncommented in order for the server to start ##

IS_CONFIGURED="yes"

## FTP Server,Port (separated by comma) ##

## If you prefer host names over IP addresses, it's your choice :

## SERVER="-S ftp.rtchat.com,21"

## IPv6 addresses are supported.

## !!! WARNING !!!

## Using an invalid IP will result in server not starting and reporting

## a good start. Work is being done to solve that in:

## http://bugs.gentoo.org/show_bug.cgi?id=75861

#SERVER="-S 192.168.0.1,21"

SERVER="-S 192.168.4.2,21"

## Number of simultaneous connections in total, and per ip ##

MAX_CONN="-c 30"

MAX_CONN_IP="-C 10"

## Start daemonized in background ##

DAEMON="-B"

## Don't allow uploads if the partition is more full then this var ##

DISK_FULL="-k 90%"

## If your FTP server is behind a NAT box, uncomment this ##

USE_NAT="-N"

## Authentication (others are 'pam', ...)##

## Further infos in the README file.

AUTH="-l puredb:/etc/pureftpd.pdb"

## Change the maximum idle time. (in minutes. default 15)

#TIMEOUT="-I <timeout>'"

## Use that facility for syslog logging. It defaults to 'ftp'

## Logging can be disabled with '-f none' .

LOG="-f pureftpd"

## Misc. Others ##

MISC_OTHER="-d -A -x -j -R -B -i"                                             

# Config file for /etc/init.d/pure-ftpd

##Comment variables out to disable its features, or change the values in it... ##

## This variable must be uncommented in order for the server to start ##

IS_CONFIGURED="yes"

## FTP Server,Port (separated by comma) ##

## If you prefer host names over IP addresses, it's your choice :

# Config file for /etc/init.d/pure-ftpd

##Comment variables out to disable its features, or change the values in it... ##

## This variable must be uncommented in order for the server to start ##

IS_CONFIGURED="yes"

## FTP Server,Port (separated by comma) ##

## If you prefer host names over IP addresses, it's your choice :

## SERVER="-S ftp.rtchat.com,21"

## IPv6 addresses are supported.

## !!! WARNING !!!

## Using an invalid IP will result in server not starting and reporting

## a good start. Work is being done to solve that in:

## http://bugs.gentoo.org/show_bug.cgi?id=75861

#SERVER="-S 192.168.0.1,21"

SERVER="-S 192.168.4.2,21"

## Number of simultaneous connections in total, and per ip ##

MAX_CONN="-c 30"

MAX_CONN_IP="-C 10"

## Start daemonized in background ##

DAEMON="-B"

## Don't allow uploads if the partition is more full then this var ##

DISK_FULL="-k 90%"

## If your FTP server is behind a NAT box, uncomment this ##

USE_NAT="-N"

## Authentication (others are 'pam', ...)##

## Further infos in the README file.

AUTH="-l puredb:/etc/pureftpd.pdb"

## Change the maximum idle time. (in minutes. default 15)

#TIMEOUT="-I <timeout>'"

## Use that facility for syslog logging. It defaults to 'ftp'

## Logging can be disabled with '-f none' .

LOG="-f pureftpd"

## Misc. Others ##

MISC_OTHER="-d -A -x -j -R -B -i"

#

# Use these inside $MISC_OTHER

# More can be found on "http://pureftpd.sourceforge.net/README"

#

# -A [ chroot() everyone, but root ]

# -e [ Only allow anonymous users ]

# -E [ Only allow authenticated users. Anonymous logins are prohibited. ]

# -i [ Disallow upload for anonymous users, whatever directory perms are ]

# -j [ If the home directory of a user doesn't exist, auto-create it ]

# -M [ Allow anonymous users to create directories. ]

# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ]

# -x [ Authenticated users can read/write files beginning with a dot ('.') 

#       Anonymous users can't, for security reasons ]

# -x [ Authenticated users can read/write files beginning with a dot ('.') 

#       Anonymous users can't, for security reasons ]

# -X [ Users can't write/read files and directories starting with a dot ('.') ]

# -D [ List files beginning with a dot ('.') even when the client doesn't

#      append the '-a' option to the list command. A workaround for badly

#      configured FTP clients. ]

# -G [ Disallow renaming. ]

# -d [ Send various debugging messages to the syslog. ONLY for DEBUG ]

# -F <fortune file> [ Display a fortune cookie on login. Check the README file ]

# -H [ By default, fully-qualified host names are logged. The '-H' flag avoids host names resolution. ]

~
```

Thank for any tips you might offer.

----------

## neonknight

You will have to recompile pure-ftpd with USE="vchroot"  :Wink: 

----------

## fmeeusen

(sorry for the long delay... don't want to be unappreciative) Thank you. I made bind links to the directories in fstab to get by. I'll try the recompile to see if that resolves it (I was under the impression that the new version of pureftpd, which I'm running, had that option precompiled).

----------

