Can't make it work in Linux Ubuntu

I had installed the IDE using Ubuntu Software Center, but the serial port appeared as disabled in Tools menu. So I downloaded the xz file and installed it manually, now the serial port appears as /dev/ttyUSB0. The board is set as Nano.

When uploading, it says:

avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied
ioctl ("TIOCMGET"): innapropriate ioctl for device
Problem uploading to board.

?

OK it was related to permissions. Solved. BUT, now I get

ioctl("TIOCMGET"): Protocol error
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
(etc)

The selected programmer is AVRISP mkII. Tried with different ones but with the same behavior.

rva1945:
I had installed the IDE using Ubuntu Software Center, but the serial port appeared as disabled in Tools menu. So I downloaded the xz file and installed it manually, now the serial port appears as /dev/ttyUSB0. The board is set as Nano.

When uploading, it says:

avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied
ioctl ("TIOCMGET"): innapropriate ioctl for device
Problem uploading to board.

?

Here is the problem and solution I got answers from Ubuntu help forum
How do you connect your printer?
I suggest that you disconnect it, issue the command

lsusb

re-connect the printer to the computer, wait 30 seconds, and then issue
the terminal commands

lsusb
dmesg | tail

and after that do this

sudo adduser ( your user name here ) dialout
makes you part of the dialout
and then you should connect at /dev/ttyUSB0 with no problems

i've this problem, how can i resolve it?

"avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied
ioctl("TIOCMGET"): Invalid argument
ioctl("TIOCMGET"): Invalid argument
avrdude: ser_send(): write error: Bad file descriptor
avrdude: ser_send(): write error: Bad file descriptor"